This informative article about population density of medieval based worlds and number of cities, towns, and villages and numbers of a give occupation relative to population.
There are links to websites to run the formula and build a kingdom quickly. One can also use Excel to build the formula into a spreadsheet, of which there are links to some examples .
I recommend saving it as a PDF so that it is available for off line use.
[Edit] Corrected link to website to use current URL. 09 February 2014.