Do 5 million immigrants live in South Africa? New York Times inflates number

After the recent outbreak of xenophobic violence in South Africa The New York Times wrote that 5 million immigrants call South Africa home. Available data suggests that this is an exaggeration.