The video shows the maximum number of iterations as 25, not 5, if I am not mistaken.
This is something the user has to give. In this case, the person demonstrates that the system should converge within 25 iterations.
Unfortunately, there is no theory to predict this number exactly. One chooses a large enough number, so that well within it, the tolerance is achieved.