What did all those medals cost China? Billions of dollars and the effort and sacrifice of countless young athletes, most of whom came nowhere near the Olympics, let alone a medal. There are an estimated 400k kids in specialized sports schools in China.
WSJ: ...In the eight years to 2006, the latest set of full-year figures available, China's spending on sports increased 149% to 9.2 billion yuan ($1.35 billion at today's exchange rates), compared with a 36% increase to 7.1 billion yuan in natural-disaster relief. Adding to the budgetary pressure is the need to rebuild after this year's Sichuan earthquake, which will be financed by a 5% reduction in all other government spending. On top of all that, China's Olympic building spree has left the government with 31 new and refurbished stadiums that it now must maintain.
...Because of China's population-control policies that allow most families only one child, they are increasingly reluctant to turn over their offspring to the state sports academies. Much of China's athletic success has been built on vast numbers of athletes from peasant stock who were willing to chi ku -- to "eat bitterness" -- to grind through the state sports system and have a shot at success.
Despite such heavy spending, China didn't make up very much ground in track and field. Liu Xiang's 110m hurdles gold in Athens was described as "the heaviest" and "the one with the most gold content" of all of China's medals. (Note, cf. Phelps, that they didn't say this about a swimming medal. They have a pretty realistic idea of which sports are the most competitive :-) Liu's failure to compete in Beijing due to injury may have been the single biggest Olympics story in the Chinese media.
On the other hand, Jamaica (population less than 3 million) had a great Olympics on the track: three golds and three world records for superman Bolt, and a medal sweep of the women's 100m.