CounterMonad and mapM