I like your first sentence better.
Each country has a history: many countries, many histories.
If you look at all the national histories with regard to their length, one of the longest histories belongs to China.
Your second sentence refers to a plurality of countries, but apparently only one history,
so I'm confused as to whether that history is just China's or some kind of shared history of several countries.