How to get the length of a cursor from mongodb using python? July 29, 2023 by Tarik It’s actually as simple as len(list(cursor)) Note that it will however consume the cursor.