word-count in ruby iteration 2