persistentCounter.c etc.: made the persistent counter more versatile, it
is not limited to hard reset counts anymore