input: Write a function to count the occurrences of each word in a list of strings.
  assert count_words(['My', 'name', 'is', 'John', 'Doe', 'My', 'name', 'is', 'John']) == {'My': 2, 'name': 2, 'is': 2, 'John': 2, 'Doe': 1}
  assert count_words(['apple', 'banana', 'apple', 'orange', 'banana', 'apple']) == {'apple': 3, 'banana': 2, 'orange': 1}
  assert count_words(['hello', 'world', 'hello', 'world', 'hello', 'universe']) == {'hello': 3, 'world': 2, 'universe': 1}
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