input: Write a function to count the frequency of each word in a given text string and return the result as a dictionary where the keys are the words and the values are their respective counts.
  assert words_count("A quick brown fox jumps over the lazy dog") == {'A': 1, 'quick': 1, 'brown': 1, 'fox': 1, 'jumps': 1, 'over': 1, 'the': 1, 'lazy': 1, 'dog': 1}
  assert words_count("Hello world world") == {'Hello': 1, 'world': 2}
  assert words_count("") == {}
  assert words_count("Python Python Python") == {'Python': 3}
  assert words_count("a a a b b c") == {'a': 3, 'b': 2, 'c': 1}
output: def words_count(text):
      if not text:
          return {}
      words = text.split()
      word_count = {}
      for word in words:
          if word in word_count:
              word_count[word] += 1
          else:
              word_count[word] = 1
      return word_count