I am currently using MongoDB with millions of data records. I discovered one thing that\'s pretty annoying.
When I use \'count()\' function with a small number of qu
You are pretty much out of luck for now, count in mongodb is awful and won't be getting better in the near future. See: https://jira.mongodb.org/browse/SERVER-1752
From experience, you should pretty much never use it unless it's a one time thing, something that occurs very rarely, or your database is pretty small.
As @Andrew Orsich stated, use counters whenever possible (the downfall to counters is the global write lock, but better than count() regardless).