Ubuntu Sort And Count Occurrence Of Lines

cat <file> |LC_ALL=C sort | LC_ALL=C uniq -c