sort file | uniq -c | sort -n