Count operation using Atlas IDE

db.companies.find({“relationships.0.person.first_name”:“Mark”, “relationships.0.title”:{"$regex":“CEO”}}).count()

I can use the above MQL using Shell. But how to execute the above statement using Atlas IDE. Thanks.

In MongoDB atlas there isn’t a built in clean way to count the documents. Here is a previous post that talks about it, and some work arounds.

https://www.mongodb.com/community/forums/t/not-able-to-view-count-in-mongodb-atlas-1-20-of-many/113771/3

1 Like

Hi Bhuppal,

You can run this aggregation using the visual pipeline builder under the “Aggregation” tab in the Atlas IDE. The final output in the preview will show the final count, as long as the aggregation executes in less than 45 seconds; otherwise, the operation will timeout as to not strain your cluster.

Please let me know if this works, and feel free to message me directly if you have any feedback or further questions. We’re always looking to improve our aggregation experience.

Best,
Julia Oppenheim, Product Manager

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.