'Reset the count of the number of calls done.
Args:
value (int, optional): The repeat value to reset to. Default
is to set it all the way back to 0.
Notes:
This is only useful if repeats != 0.'

def reset_callcount(self, value=0):

    task = self.ndb._task
    if task:
        task.callcount = max(0, int(value))
