Can you tell us more about the purpose of this counter? E.g. is it going to be displayed statically on a webpage, or is it going to be updated on that page (e.g. via Javascript)?
If it's only for display purposes (or even otherwise), it might be simpler to store the starting timestamp and then simply calculate its value on demand (e.g. "(now - start_value) / xx" where "xx" is your "every xx seconds" from above).