input: Write a python function to count the frequency of each word in a list of words.
  assert count_words(['a', 'b', 'a', 'c', 'd', 'b', 'a']) == {'a': 3, 'b': 2, 'c': 1, 'd': 1}
  assert count_words(['apple', 'banana', 'apple', 'orange', 'banana', 'apple']) == {'apple': 3, 'banana': 2, 'orange': 1}
  assert count_words(['cat', 'dog', 'cat', 'bird', 'dog', 'cat']) == {'cat': 3, 'dog': 2, 'bird': 1}
output: def count_words(words):
      frequency = {}
      for word in words:
          if word in frequency:
              frequency[word] += 1
          else:
              frequency[word] = 1
      return frequency