For example in tutorial: https://api.mongodb.com/python/3.7.1/tutorial.html#counting
>>> posts.count()
3or just of those documents that match a specific query:
>>> posts.find(
Unknown macro: {"author"}).count()
2
Also in API documentation: https://api.mongodb.com/python/3.7.1/api/pymongo/collection.html#pymongo.collection.Collection.insert_one