If Wilfred Mott leaves the battlefield after its ability has triggered but before it resolves, use the number of time counters it had on it the last time it was on the battlefield to determine the value of X.