def countElements(array):
    """
    Function purpose: return the occurancies of all values in the array 

    Input: array 

    Output: array list
    """
    list = []
    for x in array:
        if [x, array.count(x)] not in list:
            list.append([x, array.count(x)])
    return list
