Manage number of iterations