I have a data file, like
7
2
10
9
10
3
2
4
2
4
6
Each line has a single value. I want to count the occurence of each value. For instance, 10 occurs two times in this file.
Is there a simple way to do that under linux without writing formal counting program?