count values in python series code example Example: count values python from collections import Counter values=np.ones(10) Counter(values)