input: Write a python function to count the occurrences of each word in a string.
  assert count_words("This is a test of a long string with words that will be used to generate a dictionary") == {'This': 1, 'is': 1, 'a': 2, 'test': 1, 'of': 1, 'long': 1, 'string': 1, 'with': 1, 'words': 1, 'that': 1, 'will': 1, 'be': 1, 'used': 1, 'to': 1, 'generate': 1, 'dictionary': 1}
  assert count_words("apple banana apple orange banana banana") == {'apple': 2, 'banana': 3, 'orange': 1}
  assert count_words("hello world hello") == {'hello': 2, 'world': 1}
output: def count_words(s):
      words = s.split()
      word_count = {}
      for word in words:
          if word in word_count:
              word_count[word] += 1
          else:
              word_count[word] = 1
      return word_count