Update counter.R