From: aryzhov on
> any ideas?

sort | uniq -c | while read first junk;do echo $junk "($first times)";
done

just an idea, not tested