Найдите размер коллекции MongoDB Python
from pymongo import MongoClient
client = MongoClient(host = 'mongodb://localhost',port = 27017)
db = client['YOUR_DATABASE']
signal_db = db['YOUR_COLLECTION_NAME']
# size of Collection items
print(signal_db.estimated_document_count())
Shanti