sort a list by the number of occurrences of the elements in the list,"sorted(A, key=key_function)"