To show that you don't have to be a UNIX expert ("uniq has -c?") to write this program in a succinct, yet readable way.
McIlroy's word frequency program in 1 line of ruby
gist.github.com