input: Write a python function to count the occurrences of each word in a list of words.
  assert count_words(["foo", "bar", "foo", "baz", "foo"]) == {"foo": 3, "bar": 1, "baz": 1}
  assert count_words(["apple", "apple", "banana", "banana", "banana", "cherry"]) == {"apple": 2, "banana": 3, "cherry": 1}
  assert count_words(["one", "two", "three", "two", "three", "three"]) == {"one": 1, "two": 2, "three": 3}
output: def count_words(words):
      word_count = {}
      for word in words:
          if word in word_count:
              word_count[word] += 1
          else:
              word_count[word] = 1
      return word_count