Update counter.cpp