input: Write a function to count the occurrence of each character in a given input string. The function should return a dictionary where the keys are the characters and the values are the number of times each character appears in the string.
  assert char_occurrences("Hello, World!") == {'H': 1, 'e': 1, 'l': 3, 'o': 2, ', ': 1, 'W': 1, 'r': 1, 'd': 1, '!': 1}
  assert char_occurrences("aaaabbbccc") == {'a': 4, 'b': 3, 'c': 3}
  assert char_occurrences("") == {}
  assert char_occurrences("12345") == {'1': 1, '2': 1, '3': 1, '4': 1, '5': 1}
  assert char_occurrences("AaBbCc") == {'A': 1, 'a': 1, 'B': 1, 'b': 1, 'C': 1, 'c': 1}
output: def char_occurrences(input_string):
      result = {}
      for char in input_string:
          if char in result:
              result[char] += 1
          else:
              result[char] = 1
      return result