Neighbouring countries do have elephants, just not enough to make this list. For example, Nigeria has elephants, but its human population is so high that most large mammals have had their numbers drastically reduced.
I'm not sure about these figures, because (as PaterN says) of Burkina Faso - an "island" of elephants unconnected to the other African countries that do have them, and also because of a mystery lack of them in Angola when all the surrounding countries have them.
Angola had plenty of Elephants before the Angolan civil war when most of all large animals were exterminated. The Angolan Govt. is making some sort of an attempt at re-introducing these animals but is yet to spend much money doing so.
I've been to Botswana and Namibia and there are definitely Elephants that migrate between Angola, Zambia, Botswana and Namibia. That's the whole aim of the nature reserves in the Caprivi strip in Northern Namibia. I'm also a bit sceptical about the number of Elephants in South Africa, 20 000 is basically just the Kruger National Park estimate.
Alexander fought against armies and tribes with elephants as cavalry. The elephants in the Jungle Book play an important role in the book and movies. I think there are many cases of popular culture where you can relate India with elephants.
Lots of people know that the two types of elephant are the African and the Indian (basically; there are two species of African elephant.) That makes it pretty easy to guess that India is one of the countries, while you still need to figure out what specific African countries to guess.
A indication of more recent figures. Quite sad in most places, although a few are up compared to the table in this quiz. https://elephantguide.com/en/how-many-elephants-are-left-in-the-world/
Well, there'd probably be more elephants if it had shipped out less ivory, so, y'know - there's probably a causal link between the name and the elephant population.