fix counting function count_all to count_all_results