Word count with mutable/immutable map