Moving the number of attempts out of the search.