we could clean up the doc. the return type depends on the hydration. here you REALLY want the phpcr hydration, as with that it does not need to load the phpcr nodes. the other possible hydration would load the nodes and create documents from them. see https://github.com/doctrine/phpcr-odm/blob/master/lib/Doctrine/ODM/PHPCR/Query/Query.php#L170-L179 => with the phpcr hydration you get the result of [Query::execute](https://github.com/phpcr/phpcr/blob/master/src/PHPCR/Query/QueryInterface.php#L69) which is a QueryResult and you need to call [QueryResult::getRows](https://github.com/phpcr/phpcr/blob/master/src/PHPCR/Query/QueryResultInterface.php#L45) to get something countable.