increment numbers, atomically, in python
