Four months per country would be the average, but the distribution wouldn't be equal like that, especially because I doubt anyone trying to do this would plan a separate trip for each country. If you wanted to, you could fairly easily fly into somewhere in the Schengen zone, get a rail pass, and do all 26 countries in the zone in a couple of months' time, without any visas, and staying in hostels you booked along the way. The only planning you'd need to do would be to book airfare, and that would give you a fair bit more wiggle room for the rest of the world.