getting count of documents and the actual documents mongo code example Example: mongo count db.collection.countDocuments( <query>, <options> )