Extract StringCounter::accumulate()