CSHARP-1128: Replaced the server selection semaphore with checking the count inside the lock.