Help for this page
cut -f1 -d\| input_file | sort | uniq -c
... | perl -pale '$_=join "|",$F[1],$F[0]'