countOccurrences_optimizedForZero (faster than countOccurrences for big searches?)