counts words like a boss (and like the Unix wc command)