I just watched the vid. Fu**ing awesome trick. But, how did he guess the no. at the end ?
Derren is also an amazing pickpocket so could have swapped the envelopes with one an assistant wrote down after the game. The footage of him manhandling the chessmaster was likely edited out.
Here are some of his techniques on display -
https://www.youtube.com/watch?v=Br2YfuR-Iv0