For me the African countries are the most surprising - would speculate that religious/linguistic/political divisions have been too intractable. The area that once formed Ethiopia, for example, has an astonishing 84 languages according to the Ethnologue.
With Pakistan there is a similar story: a nation essentially created on religious grounds containing a number of competing communities. Urdu is the de facto official language, only this arrangement is not formalised as it is with it close cousin Hindi in India. And in Bosnia there is little appetite for opening a linguistic battlefield for obvious reasons.
Costa Rica does not have the obvious political tensions that usually makes language contentious. It has historically been the most stable democracy in Latin America. But though Spanish dominates, there are competing languages:
Some native languages are still spoken in indigenous reservations the most numerically important are the Bribri, Maléku,Cabécar and Ngäbere languages some of which have several thousand speakers in Costa Rica - others a few hundred. Some languages like Teribe and Boruca have less than a thousand speakers. An Creole-English language (also known as Mekatelyu) is spoken in the Caribbean coast. Around 10.7% of Costa Rica's adult population (18 or older) also speaks EnglishEnglish has, of course, become the world's de facto second language. So the appearance of the two giants of Anglosphere: the UK and the USA on the list may seem puzzling. I would argue that this is essentially a product of self-confidence - English achieved a natural pre-eminence without the need for any paperwork to support this role. Only where that dominance has been challenged - by Spanish in some US states, for example - has there been a legal attempt to formalise English as the official language.
From this point of view, the assertion of language can be a defensive measure, often linked to a fragile sense of nation. My Irish parents, for example, were taught entirely in their national language (Gaelic). The only problem with this was that Gaelic was a foreign language to them - the vast majority of Irish people have been speaking English as their first (often sole) language for more than a hundred years. And as Kingsley Amis points out in The Old Devils, translating signs 'for those Welsh people who don't recognise the word taxi' suggests that some language revivalists may be trying a little too hard.