Implement text counter.