A stopping criterion for iterative regularization methods