'Return count of entries in the undobuffer.
No argument.
Example (for a Turtle instance named turtle):
>>> while undobufferentries():
undo()'

def undobufferentries(self):

    if (self.undobuffer is None):
        return 0
    return self.undobuffer.nr_of_items()
