Explainer gets it right for Chongqing and Chengdu. It's important to remember that some "cities" have boundaries that extend far beyond the apparent. Because of that, and the failure of official listings to undercount migrant populations, whose registration cards list another location as their "official" residence, city populations are vastly undercounted. The Wikipedia entry for Beijing highlights this undercount, showing (correctly) that the "official" population of Beijing is 12 million, with more than five and a half unofficial, but very real, others living in the city.
That article states that Beijing is the second largest Chinese city, after Shanghai, which is incorrect if you count the actual population of Chongqing, a population which amounts to a staggering 32 million people-- about the same as the population of Canada.
An illustration of how the Chinese think of population. In 1992, my wife traveled outside the city to the village where ducks are raised for the famous Peking Duck, which actually is a popular dish in the city. Being a demographer, she asked what the population of the village was. After some consultation with the locals, the answer came back: "Just a bit over one million."