added counting iterations to stagnation_solution