More than 22.4 million people applied in 2017 to a U.S. visa program that provides 50,000 green cards, or lawful permanent residence, each year through a lottery system, according to a Pew Research Center analysis of U.S. State Department data.