ho come do i get a variable name like this:

%name%n

where n is being incremented