Introduction

A Python function that counts the occurrences of each character in a given string.

For example, given the string "ab", the function would return {'a': 1, 'b': 1}.