mongo db get total number of collections code example Example: see number of documents in mongodb collection db.collection.count()