Add count query support