No empire ruled 100% of Indian subcontinent even British, and after reaching at peak no empire lasted for long - within 100-200 years they collapsed. They conquered different nations but couldn't hold long enough to transform them into one nation. That's why saying that India was one country since 1000s of years is as much illogical as saying Asia was one country.
No country in this world has been 1 nation for 1000s of years. Germany in 1500s was different geographically then today, France was different in 1700 from today, etc. But there is no doubt that the present day French and German nations inherit the kingdoms these nations had in past, even if the map geographically has been changed due to historical circumstances. Same goes for India.
Also, nationhood of India is based on shared cultural values dating back many thousand years, and not being part of the same empire or being under the same king.