MongoCollectionCount[MongoCollection[…]]
counts the number of documents in MongoCollection.
MongoCollectionCount[MongoCollection[…], query]
counts the number of documents in MongoCollection matching the query query.


MongoCollectionCount
MongoCollectionCount[MongoCollection[…]]
counts the number of documents in MongoCollection.
MongoCollectionCount[MongoCollection[…], query]
counts the number of documents in MongoCollection matching the query query.
Details and Options
- To use MongoCollectionCount, you first need to load MongoLink using Needs["MongoLink`"].
- query is an Association.
- See "Query and Projection Operators" in the MongoDB manual for available query operators.
- MongoCollectionCount corresponds to db.collection.count in the MongoDB manual.
See Also
Tech Notes
Related Guides
Text
Wolfram Research (2018), MongoCollectionCount, Wolfram Language function, https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionCount.html.
CMS
Wolfram Language. 2018. "MongoCollectionCount." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionCount.html.
APA
Wolfram Language. (2018). MongoCollectionCount. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionCount.html
BibTeX
@misc{reference.wolfram_2025_mongocollectioncount, author="Wolfram Research", title="{MongoCollectionCount}", year="2018", howpublished="\url{https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionCount.html}", note=[Accessed: 16-August-2025]}
BibLaTeX
@online{reference.wolfram_2025_mongocollectioncount, organization={Wolfram Research}, title={MongoCollectionCount}, year={2018}, url={https://reference.wolfram.com/language/MongoLink/ref/MongoCollectionCount.html}, note=[Accessed: 16-August-2025]}