Quite simple. In English, countries is plural and country is singular.
Japan is one of the richest countries in the world. CORRECT (There are many countries in this world and Japan is richest of them.) Here we will not use country . Since you added in the world we are talking about the countries in the whole world.