Not able to view count in MongoDB Atlas. 1-20 of MANY

Hello Team,

I am facing an issue with MongoDB Atlas cluster. I am not able to view the count of documents returned.

It shows 1-20 of Many. I am trying to use the count clause but there is no output. Attached screenshot for your reference. Please help.

Hi @Shubham_Gupta2,

There is no any feature to view the exact count in the Atlas cloud cluster. Kindly use MongoDB compass for this.

Or, use count() functions in the Mongodb shell/terminal to view the exact count.

In case of any further questions please feel free to reach out.

Thanks,
Kushagra

Hello Kushagra,

I have tried to run the same query in terminal. There is no output. I have re-verified the query. it is same but there is no output in shell. In MongoDB Atlas, it used to show the total record returned from query. Is there any settings for it? or It shows “MANY” because there are way more than number of defined outputs?

Please help

Consider the example of the query : db.zips.find({"$nor":[{“pop”:{"$lt":5000}},{“pop”:{"$gt":1000000}}]}).count() : The output is 0 in shell but the same query yeilds many results for it.

Please help

May be your are not connected to the correct DB
Make sure you are using straight quotes around the fields

I can see your query gives result from the shell
Post a screenshot of how you ran the query

Hi @Shubham_Gupta2,

As @Ramachandra_Tummala mentioned can you post the screenshot of the terminal.

Thanks,
Kushagra