The number of listed companies in South Africa has declined by two thirds since 1990. The number of listed companies has also declined meaningfully in major economies like the USA, although there have been exceptions, including India, China and Australia.
This post has country-level data from the World Bank.