Started code for counter