input: Write a python function to count the occurrences of each character in a string.
  assert count_occurrences('Hello World!') == {'H': 1, 'e': 1, 'l': 3, 'o': 2, ' ': 1, 'W': 1, 'r': 1, 'd': 1, '!': 1}
  assert count_occurrences('abcdabcd') == {'a': 2, 'b': 2, 'c': 2, 'd': 2}
  assert count_occurrences('') == {}
output: def count_occurrences(s):
      occurrences = {}
      for char in s:
          if char in occurrences:
              occurrences[char] += 1
          else:
              occurrences[char] = 1
      return occurrences