Simple code counter.