Create an object from an array where each element becomes a key and the value is the count of that element.
Implement count_elements(arr). The input is a list of integers, and the output is a dictionary whose keys are the string representation of each integer and whose values are occurrence counts. Return an empty dictionary for an empty array.
Function signature: def count_elements(arr):
def count_elements(arr):