public int queryCount ( final KeyQuery query ) { log . trace ( "Starting count query" ) ; final QueryResults < com . google . cloud . datastore . Key > results = ds . run ( query ) ; return Iterators . size ( results ) ; }
The fundamental query count operation . This doesn t appear to be implemented in the new SDK so we simulate with a keys - only query .