added Query::getNumRecords for badges etc.