What are some laws about limiting the number of foreigners in a country? Which country has the strictest such laws? For example, the number of foreigners shouldn't exceed 50,000 or 1% of the number of citizens.
Many countries limit the number of foreigners who can come into a country from specific other countries with immigration laws, and by implication, starting with the number of foreigners in the country when the law is passed, this limit on inflow establishes a de facto cap on the number of foreigners (in immigration law people who are neither citizens nor nationals of a country are usually called "aliens" whether or not their immigration status is lawful) who may be legally present in the country. Some countries, including the U.S., also, in practice, treat countries that have large numbers of citizens or nationals who are not legally present in the country less favorable for immigration purposes than those where this is not the case.
But, I do not know of any country that has an absolute numerical or percentage cap on the number of foreigners who may be in the country separate and apart from its immigration laws.