new practice problem, counting occurrences in a list