Could not understand if your problem is for storing the counter or displaying it