Simplify check_number_of_results method