The ruling Democratic Progressive Party won nine of 22 mayoral and county executive races, but the opposition Kuomintang retained Taipei and New Taipei City.