# Counter

*noun*

say it: **“KOWN-ter”** **/ˈkaʊntər/**

In Python, a tool from the collections module that counts how many times each item in a list appears and can list the most common ones.

## What is a `Counter`?

A `Counter` counts how many times each item appears and can tell you the most common ones.

```python
from collections import Counter

votes = ["pizza", "tacos", "pizza", "sushi", "pizza"]
print(Counter(votes).most_common(1))  # [('pizza', 3)]
```

## In a sentence

- “She used a **Counter** to find which loaf sold most often.”
- “A **Counter** of the votes showed pizza won with 3.”

Level: Freelancer · [More Python terms at this level](https://www.ask-codey.com/glossary?category=python&level=4)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/counter
