input: Write a python function to count the frequency of each character in a string.
  assert countCharacters("String Counting") == {'S': 1, 't': 2, 'r': 1, 'i': 2, 'n': 3, 'g': 2, ' ': 1, 'C': 1, 'o': 1, 'u': 1}
  assert countCharacters("hello world") == {'h': 1, 'e': 1, 'l': 3, 'o': 2, ' ': 1, 'w': 1, 'r': 1, 'd': 1}
  assert countCharacters("aabbcc") == {'a': 2, 'b': 2, 'c': 2}
output: def countCharacters(s):
      frequency = {}
      for char in s:
          if char in frequency:
              frequency[char] += 1
          else:
              frequency[char] = 1
      return frequency