Implement solution to word-count problem in Haskell.