Aug 172011
Count the total number of objects in the collection in MongoDB
Answer:
In MongoDB, to count the total number of objects in the collection, you can use the following statement in the mongodb Interactive shell.
db.test.count()
The above statement will return the total number of objects in the collection "test"