I have got over 600k lines of string. I want to group same strings and learn their counts.
So example
i go to school
i like music
i like games
i like music
i like music
i like games
i like music
So result will be
i go to school , 1
i like games , 2
i like music , 4
How can I do that with the fastest possible way?