uniq
uniq [-c]
Risk: Safe
What it does
Joins repeated lines that sit together. -c counts them.
When to use it
After sort, to count how often each line appears.
Example
$ cut -d" " -f3 orders.log | sort | uniq -cOrders per dish.
Learn it in: Pipes and redirects · Official docs