"Shanghai is a big city."
isn't there a measure word for towns?
in general, is 个 always a safe fallback if you cannot remember a specific measure word?
’个‘ is fine for towns, cities, or countries, but ‘座’ sounds better. There are lots of cases that you can use ’个‘, but it is not always safe. For example, you cannot use ’个‘ to count televisions, trees, beds, etc.