input: Write a function to count the frequency of each word in a given text string and return a dictionary where the keys are words and the values are their respective counts. The function should split the text by spaces and ignore the case of the words. If the text string is empty, return an empty dictionary.
  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("The quick brown fox jumps over the lazy dog") == {'the': 2, 'quick': 1, 'brown': 1, 'fox': 1, 'jumps': 1, 'over': 1, 'lazy': 1, 'dog': 1}
  assert words_count("hello world hello") == {'hello': 2, 'world': 1}
  assert words_count("THIS IS A TEST") == {'this': 1, 'is': 1, 'a': 1, 'test': 1}
  assert words_count("") == {}
output: def words_count(text):
      if not text:
          return {}
      words = text.lower().split()
      word_count = {}
      for word in words:
          if word in word_count:
              word_count[word] += 1
          else:
              word_count[word] = 1
      return word_count