Can foreigners open a company?

Yes. The exact process depends on the country, service scope, and required documentation.