While the name is the same, these are two different places in the hierarchy which share the same name. Compare the metadata facets of the Town (http://isithackday.com/geoplanet-explorer/index.php?woeid=2172736) vs. the Prefecture (http://isithackday.com/geoplanet-explorer/index.php?woeid=26198373).
GeoPlanet was not designed to be used as a data extraction tool. There may be thousands of towns in a country. A better way to get this information may be GeoPlanet Data (see http://developer.yahoo.com/geo/geoplanet/data/). This product contains text files that include information about every place that GeoPlanet knows about. You can extract lists of prefectures/provinces by country, towns by prefecture/province, and suburbs by town from these files.