input: Write a python function to count the occurrence of each word in a given text using a dictionary data structure.
  assert counter("hello world hello") == {"hello": 2, "world": 1}
  assert counter("test the function test the code") == {"test": 2, "the": 2, "function": 1, "code": 1}
  assert counter("one word one time") == {"one": 2, "word": 1, "time": 1}
output: def counter(text):
      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