input: Write a function to count the occurrence of each character in a given input string. Return a dictionary with characters as keys and their respective counts as values. If the input string is empty, return an empty dictionary.
  assert char_occurrences("Hello, World!")=={'H': 1, 'e': 1, 'l': 3, 'o': 2, ', ': 1, 'W': 1, 'r': 1, 'd': 1, '!': 1}
  assert char_occurrences("AAAABBBCCD")=={'A': 4, 'B': 3, 'C': 2, 'D': 1}
  assert char_occurrences("")=={}
  assert char_occurrences("a")=={'a': 1}
  assert char_occurrences("abcabc")=={'a': 2, 'b': 2, 'c': 2}
output: def char_occurrences(input_string):
      if not input_string:
          return {}
      char_count = {}
      for char in input_string:
          if char in char_count:
              char_count[char] += 1
          else:
              char_count[char] = 1
      return char_count