input: Write a python function to count occurrences of each word in a list.
  assert word_count(["apple", "orange", "apple", "orange", "pear"]) == {'apple': 2, 'orange': 2, 'pear': 1}
  assert word_count(["banana", "banana", "banana"]) == {'banana': 3}
  assert word_count([]) == {}
  assert word_count(["apple", "banana", "apple", "pear", "banana", "pear", "pear"]) == {'apple': 2, 'banana': 2, 'pear': 3}
output: def word_count(words):
      count_dict = {}
      for word in words:
          if word in count_dict:
              count_dict[word] += 1
          else:
              count_dict[word] = 1
      return count_dict