I'm looking for a feasible way to get the length of cursor got from MongoDB.
It's actually as simple as
len(list(cursor))
Note that it will however consume the cursor.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With