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