Each country's people, spread out by the density of the grid cell they live in. Every country gets the same total area, so a small country and a big one compare as shares.
Density is people per km² of the cell. On the 100 m grid a city block next to a park counts as dense. On the 1 km grid the two are averaged, so everything moves left. Colour follows density. On the 1 km grid the breaks at 300 and 1,500 people per km² are the ones GHSL uses for towns and cities.
The number beside each country is its median: half its people live in denser cells.
A metro or state shown with its country is drawn at the country's scale, so its area is its share of the country's people. Shown without its country, it is drawn as its own 100%.