Add count field to AbstractDataQuery