input: Write a python function to count the occurrences of each word in a sentence.
  assert count_words("John and Mary went to the school") == {'John': 1, 'and': 1, 'Mary': 1, 'went': 1, 'to': 1, 'the': 1, 'school': 1}
  assert count_words("This is a test. This test is only a test.") == {'This': 2, 'is': 2, 'a': 2, 'test.': 2, 'test': 1, 'only': 1}
  assert count_words("Repeated repeated repeated words words") == {'Repeated': 1, 'repeated': 2, 'words': 2}
output: def count_words(sentence):
      words = sentence.split()
      word_count = {}
      for word in words:
          word_count[word] = word_count.get(word, 0) + 1
      return word_count