The value of X is calculated when Prismabasher's last ability triggers for the purpose of defining the maximum number of target creatures. It is calculated again when the ability resolves to determine the amount of the power and toughness bonus.