Added simple count query support