Implement count for simple queries - references #12