subtotalling identical records



I have a file of non-unique names.

allen
allen
allen
bob
bob

What I want is

allen 3
bob 2

Any one-liners to do this?

thanks
.