Hi Devchop,
you could try something like this:
var nArray = new Array();
for ( var counter = 0; counter < NTIMESASINPUT; i++ )
{
nArray.push( counter );
}
Now you have an Array with N items and run a nested workflow with N loops if you built N as input to the nested workflow.
Regards,
Chris