added more counting queries