The enumerate() function adds a counter to an iterable.
So for each element in the cursor, a tuple is produced with (counter, element); the for loop binds that to row_number and row, respectively.
>>> elements = ('foo', 'bar', 'baz')
>>> for elem in elements:
... print elem
>>> for count, elem in enumerate(elements):
... print count, elem