It really comes down to two factors: waterways and open land.
TL;DR: More waterways mean more cities and more people; more open land means more farmers and less people.
The above summary pretty much says it all, but I obviously have to expand on just where the connection lies. I think I can cite some pretty good examples to support my point, but if I've made any logical or (even worse) factual errors, I'd be obliged if anyone could point them out.
Humans like to settle where there are good natural resources nearby that can aid them. If these resources are plentiful enough, more humans will move in. The settlement becomes a village, then a town, and finally a city. What are these so-called "resources" that I've been talking about? Well, they can be a wide variety of things - open land, good sources of natural food and water, good ways for transportation, etc. One resource that combines all of these is a waterway. It could be a river, a stream, an ocean - anything you can dream up.
What are the benefits of a waterway? Well, a waterway satisfies a few of humanity's simplest needs:
- Food
- Transportation
- Agriculture
Food
The obvious thing that any marine environment can provide is a (fairly) good source of food. Fish, crab, lobster, eel, and a whole bunch of other delicacies. Rivers are particularly good because animals use them a lot to travel. Salmon famously use them to get upstream to spawn. Crabs may live in the shallows. And there are other animals that like to eat these aquatic animals. Otters, bears, and a whole host of other carnivores. Herbivores, too, like to come to rivers to drink. If you live in the America Northeast, just think of the venison. . .
There are, for the vegans, other options. Plants need water to live, and so if you're really out of food, you can always grab a few berries off a bush. But have your friend try them first. That could really save your life. . . Other plants, too (depending on the climate) may grow near rivers.
Transportation
Chances are, humans are going to need to go to other places outside the settlement - wars, trade, family reunions with the in-laws, etc. Waterways provide a great mode of transportation. You can't exactly use a boat in the middle of a plain, can you? If you're going downstream, you have a source of transportation that requires little effort. Upstream does require some effort (e.g. sails or rowers), but it's still an improvement over trekking miles and miles with a donkey and a cart.
Rivers and oceans easily bolster trade. There's a reason that the term "port city" is so ubiquitous. Back in the Middle Ages (and today), port cities were a dime (or shilling, rupee, guinea, yen, etc.) a dozen. Some of the bigger ones include London, Liverpool, Rotterdam, etc. More trade means a healthier economy, and more available resources.
Agriculture
Yep, waterways can help agriculture near cities. Even if land isn't directly near the river/ocean/whatever, canals can be built to help with irrigation. A farming economy an exist near an urban area, drawing people even closer to cities. This fell apart with the rise of suburbs, but the Middle Ages saw many serfs and peasants working and living near large population centers.
Open land, however, also draws people. Sure, Mesopotamia was the poster child for settlements by the water, but it wouldn't have succeeded without agriculture - which resulted from a lot of open land. Plains are helpful, as are valleys - which are often created by glaciers, which eventually melt to become rivers. Wherever it is, open land draws people. There are primary uses for it:
- Agriculture
- Grazing and raising livestock
Agriculture
Okay, back to farming. It's hard to grow corn in the Himalayas. Just think about that sentence for a while. Crops are incredibly important to a civilization, and so humans will also settle where there is room to grow food. The Three Sisters (corn, squash, and beans) were important to the indigenous people of North America. They could be grown in a variety of regions, from rocky New England to the sunny Midwest. Sure, they needed a certain climate to thrive in, but open land was another factor. Can you grow corn in the Rocky Mountains or in the eastern woodlands? I didn't think so. So open land definitely draws people.
Livestock
I hope that satisfied all the vegans out there, because they aren't going to like this next bit. The other good thing about open land is that animals like it, too. The tribes of the North American plains used it to their advantage by hunting buffalo. Later on, cattle ranchers drove out the tribes and used the land to raise cattle. Both groups were drawn by the allure of open land and the possibilities it held. Why waste your time staring at corn kernels when you can just go out and kill a buffalo?
How does this relate to you question?
I went off on quite a tangent there, and I did it to try to show how important waterways and open land are to civilizations. I emphasized them because the rest of my answer depends upon those two factors, and those two factors alone.
Calculating population
Here's the bit you have to wake up for. I'll start out by counting rural farmers and ranchers. In medieval Europe, many peasants worked as serfs, working on a lord's land. In fact, a large portion of the population lived in rural communities:
The High Middle Ages saw an expansion of population. The estimated population of Europe grew from 35 to 80 million between 1000 and 1347, although the exact causes remain unclear: improved agricultural techniques, the decline of slaveholding, a more clement climate and the lack of invasion have all been suggested. As much as 90 per cent of the European population remained rural peasants.
This suggests about 8 million people living in "suburban" areas (i.e. small towns and villages) and cities.
Let's say a lord owns $a$ acres of land. On each acre he might have $80$ serfs working on it. So to calculate the population of a region, you would simply do
$$a \text { acres} \times \frac{80 \text { serfs}}{\text { acre}}$$
Let's assume that all the open land in a region is used for this type of agriculture (which is likely the case). So you can simply use the above formula to calculate the population.
What about cities? There's no easy formula for this; you'll just have to do estimation. You'll have more cities if
- You country has a long coastline (or any coastline at all)
- Your country has a lot of waterways
So western China might not have a lot of cities, while eastern China will.
I'd estimate perhaps 1.5 cities per major river, and 10 cities per length of the east coast of the United States (2,000 miles, give or take. From here,
The dimensions of the Western European cities were too small. Usually, their population numbers from 1000 up to 3-5 thousand people. Even in XIV-XV century, the cities with 20-30 thousand inhabitants were considered large. Only a few very large cities have a population of more than 80-100 thousand (Paris, Milan, Venice, Florence, Cordoba, Seville).
A region like Western Europe could, perhaps, have a half-dozen of these large cities, with perhaps 20 others of 5,000 people or more. Let's estimate a population of roughly 800,000 people in European cities during the High Middle Ages - 1% of Europe's population.
Summary
Contrary to what I had originally hypothesized, cities were not a huge part of the population of Europe; they held perhaps only a few percent of the population. Most people were rural farmers, living in densities of roughly 80 people per acre. If you know what fraction of your country is either arable land or land that can be made arable by magical means, you can figure out what the rural population is. From there, you can either use the rule of them that 90% of people were peasants, or simply sprinkle in a half-dozen 80-100,000-person cities per continent, with maybe 20 or so at 5,000 or more.