for(%i = 0; %i < 4; %i++)
is the exact same thing as this:
%i = 0;
while(%i < 4)
{
%i++;
}
This loop will run 4 times, because the starting step is 0 (what we declare %i as), and the loop terminates when %i reaches 4. Meaning, %i will not run when %i is 4, so %i will run when %i is equal to: 0, 1, 2, or 3. That is 4 steps.
If you used the <= operator, it will run while %i is less than or equal to 4, which adds 4 to the list, which makes it 5 steps.