finding the number of documents in a collection in mongo java code example Example: see number of documents in mongodb collection db.collection.count()