Implemented number_queries