Implemented count queries, and added raw data returns.