Implement counter.

Not yet hooked up to graphic.