count collection mongodb code example
Example 1: mongo count
db.collection.countDocuments( <query>, <options> )
Example 2: count collection mongodb
db.mycollection.count()
db.collection.countDocuments( <query>, <options> )
db.mycollection.count()