The For node will loop until the VM timeout is reached if you give it a variable for the end value. This does not happen when you specify and end value in the node itself. Attached is an Udon asset that just loops a number of times specified by a public variable on Start().

https://drive.google.com/open?id=1aa-A0__yedV4KGFZaTYECqf9lz91tXf-