Update the number of stages (necessary because it can change, and it affects the computation of the % process completed)