Given a list like this one
arr = [1, 1, 2, 2, 2, 3, 3]
I would like to compute the number of occurencies of each element and storing it in a new l