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.

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.

Julia Oppenheim, Product Manager