The value of X for the first three chapters is determined only as each chapter ability resolves. Once that happens, the value of X won't change later in the turn even if the number of lore counters on The Triumph of Anax changes.