Rather than asking how to count a settlement as a "City," you might want to ask, "Who was counting and why?"
u/BRIStoneman wrote this answer about a year ago discussing some of the difficulties tied to labeling human settlements which might interest you (I also contributed in the comments with this slightly more rambling comment). The answer does focus on the classification of smaller settlements like villages, towns, or hamlets, but I think it's still useful to look at as it not only touches the difficulty of using explicit labels, but also gets at another part of your question: by and large, pre-industrial human settlements were small, and large cities were the exception rather than the norm. In other words, population density was much lower than anything you or I might be used to.
Two years ago I also wrote this brief comment on the size and density of Medieval Cities which might also clear up what medieval communities might have looked like. More directly to the point of your questions, I also participated in this discussion some three years ago on the historic population of some important Italian cities in the context of food security where I do cite hard population numbers for medium and large-sized Italian cities in the Medieval Era which might interest you.
Another thing to consider is the fact that for many Medieval societies, something like a "City Charter" or the "Title of City" existed independently of how populous a community might be. Charters officially proclaiming a "City" more often than not served the purpose of merely recognizing and/or legitimizing preexisting urban institutions (or occasionally to legitimize the modification of these privileges). This typically was granted by some higher authority (be that authority religious, like a Bishop or Pope, or secular, like a King or Emperor). So I think it is important to differentiate if we are talking about the legal "status" of a community as a city, or merely a large human settlement — the two concepts are similar but weren't explicitly linked: large population size was a common prerequisite for a community to receive a "City Charter" or similar status, but it was not the only prerequisite.
It goes without saying that these are all answers to similar questions won't fully address everything you ask about, and there's always more to be said.