count data mongo driver code example Example: see number of documents in mongodb collection db.collection.count()