The mongo
PHP extension is deprecated in favour of the mongodb
extension. This extension is used together with the mongo-php-library
.
In the old extension one could get the result count from the cursor using MongoCursor::count(). However, the new cursor MongoDB\Driver\Cursor has no such method. What is the new way of getting the number of results from after performing a query against MongoDB?