use HYDRATE_PHPCR query mode for ODM Adapter count
for large collections  this has a smaller memory footprint and seems to be faster