There is no fixed number of attempts. It will depend on the situation of each person or couple. There are those who achieve pregnancy in the first IVF attempt with donor eggs, and want to need two, three or four treatments until they can obtain a positive pregnancy test result. There are also patients who, even with donor eggs, are unable to have children because their problem is uterine and not ovarian.
In any case, egg donation generally increases the pregnancy rate, since the eggs come from young, healthy women, i.e., they are good quality eggs.