how to count mongodb collection fom shell code example Example: count collection mongodb db.mycollection.count()