How to set node properties as incrementing numbers?

This should work, wrapping the pair[0] in () to tell Neo4j that it's a node:

MATCH (n) where n.gid="Tt" 
WITH collect(n) as nodes
WITH apoc.coll.zip(nodes, range(0, size(nodes))) as pairs
UNWIND pairs as pair 
SET (pair[0]).id = pair[1]