count change (haskell)