Urban Population counts only the citizens generated by constructing buildings—it does not include Specialists. Some effects may care about the number of Urban Population in a settlement. Here are a couple of examples:
Abbasid's Mamluk: +1 Combat Strength for every Urban Population.
Inca Tradition: Settlements receive +0.5 Gold for every Urban Population.
Tip: Focus on constructing buildings to boost your Urban Population when playing Civs that benefit from it.