China has been "a country" for well over 2000 years, although sometimes ruled by more than one regime.
India has only been "a country" since 1948, although most of the subcontinent was briefly united under a single regime several times during the same 2000 years. IOW the basic history of India is one of division, with not even the concept of a common nationality developing until the early 20th century in reaction to British colonization. China's basic history for over 2000 years has been one of unity.
India is far more diverse than China, with multiple languages and ethnic groups and cultures with ancient conflicts. It is really much more like the continent of Europe than it is like "a country" such as China or the USA.