Implemented counter.v