Hi there,
if you what to do it in a more KNIME way you can use Group Loop Start node together with Counter Generation node. Here is workflow print screen:
And here is workflow attached to check it out:
2019_06_18_Generate_Seqence_Within_Group.knwf (13.7 KB)
Br,
Ivan