number_list = numpy.array([1, 1, 2, 3, 4, 4, 1]) (unique, counts) = numpy.unique(number_list, return_counts=True)