presto-main/src/main/java/io/prestosql/SystemSessionProperties.java/SystemSessionProperties/getQueryMaxStageCount
class SystemSessionProperties:    public static int getQueryMaxStageCount(Session session)
    {
        return session.getSystemProperty(QUERY_MAX_STAGE_COUNT, Integer.class);
    }