theunixtips.com
bash : Count number of recurrence of lines
Using sort and uniq commands, one can count number of recurrences of records in a file.