lets say we have this array:
Sample_array = [1,2,4,4,5,1,2,4]
and we want to know how many times each element occurs in this array, without u