mongodb get coudn of documents and data in one request code example Example: mongo count db.collection.countDocuments( <query>, <options> )