While loop Drivers and additive movement
Add a property to keep track of the drivers previous value, after adding the location driver.
The update order of the drivers will have exactly one update/frame, where the new location of the driver isn't copied to the custom property.


(I will add more details later, if needed.)


  Minor point
  The self.location[0] with itself as a driver is not very elegant. Use a shape key if you want to have a visual indicator of 0 and 1 as in the example file.
  Also use the Transformation Constraints instead of the channel locks, since the channel locs won't stop changing of the number via the transform (N) panel.




Changing the property every full second

You can check for full seconds with frame%24 == 0.

Expression: var if frame%24 != 0 else var+1 if var1==1 else var
with var = empty.y and var1 = cube.x as in the original demo file.

Unraveled, this is:

# do nothing (value = var) for 23 of 24 frames
if (frame%24 != 0):
    return var
else:
    # on every 24th frame (frame%24 == 1) check for the condition
    if (var1 == 1):
        return var + 1
    else:
        return var