counter indexed monad