Now it always resets the counter to 24, but I also want it to reset to 14, I don't know if that's possible.
How is it supposed to know which to reset the counter to, 24 or 14?
As far as time the idea is to not restart the clock but rather save the value of millis at the start time and watch the clock for when the clock millis minus the start millis is more than or equal to the desired interval.
In a plain example, if I want to do something an hour from 3:00 then I wait until 4:00 - 3:00 >= 1 hour. I don't reset the clock to 12:00 every time I want to time something. Imagine if I wanted to time 2 events that start at different times, that second reset will screw up timing the first event if it hasn't already happened.
Instead of a 12 hour clock we have a 4-billion-and-some millisecond clock that takes 49.7-some days to go around.
This is something that once you understand the POV, you will see it's very useful even for what you want.