Let's say you need to get a count of unique lines in a file.

$ sort file_name | uniq -c |sort -n