I\'m looking for a feasible way to get the length of cursor got from MongoDB.
Counts the number of documents referenced by a cursor. Append the
count()
method to afind()
query to return the number of matching documents. The operation does not perform the query but instead counts the results that would be returned by the query.
db.collection.find().count()
https://docs.mongodb.com/manual/reference/method/db.collection.count/