Including code for screen control and resetting the count