The number of players in the game is checked only as you choose the value for X. Once you've cast Open the Way, players leaving the game in response to the spell won't affect the number of land cards you'll find.