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