Check the max number of stages