At the end of epoch 4 (block 840,000) there were 19,687,500 bitcoin mined. That would leave 312,500 bitcoin left to be mined to reach 20M. With a subsidy of 3.125 bitcoin per block, that's only 100,000 blocks into epoch 5 to reach 20M.
840,000+100,000=940,000.