mongodb/mongo-ruby-driver — pull request #138 by ebroder (2012-12-04 23:52:36+00:00)
Title: RUBY-514 Specify a socket when making a count query

I don't quite understand the socket checkout/checkin code well enough to know if this is 100% correct, so feel free to treat this as a strawman.

Right now, though, we've noticed that count queries seem to always go to the primary, even if we specify a read preference. In my very minimal testing, this seemed to cause that read preference to be respected