@classmethod
def next(cls, name, advance=True):
    """give (and, if advance, then increment) a counter variable"""
    v = cls.fetch(name)
    next = v.value
    if advance:
        v.value = next + 1
        v.flush()
    return next
