Given the task definition and input, reply with output. This task involves creating answers to complex questions, from a given passage. Answering these questions, typically involve understanding multiple sentences. Make sure that your answer has the same type as the "answer type" mentioned in input. The provided "answer type" can be of any of the following types: "span", "date", "number". A "span" answer is a continuous phrase taken directly from the passage or question. You can directly copy-paste the text from the passage or the question for span type answers. If you find multiple spans, please add them all as a comma separated list. Please restrict each span to five words. A "number" type answer can include a digit specifying an actual value. For "date" type answers, use DD MM YYYY format e.g. 11 Jan 1992. If full date is not available in the passage you can write partial date such as 1992 or Jan 1992. If you find multiple spans, please add them all as a comma separated list. Please restrict each span to five words.

Passage: Following a series of invasions beginning shortly after their conquest of England in 1066, the Normans seized much of Wales and established quasi-independent Marcher lordships, owing allegiance to the English crown. However, Welsh principalities such as Gwynedd, Powys and Deheubarth survived and from the end of the 11th century, the Welsh began pushing back the Norman advance. Over the following century the Welsh recovery fluctuated and the English kings, notably Henry II, several times sought to conquer or establish suzerainty over the native Welsh principalities. Nevertheless, by the end of the 12th century the Marcher lordships were reduced to the south and south east of the country. The principality of Gwynedd was the dominant power in Wales in the first half of the 13th century, with Powys and Deheubarth becoming tributary states. Gwynedd's princes now assumed the title "Prince of Wales". But war with England in 1241 and 1245, followed by a dynastic dispute in the succession to the throne, weakened Gwynedd and allowed Henry III to seize Perfeddwlad . However, from 1256 a resurgent Gwynedd under Llywelyn ap Gruffudd resumed the war with Henry and took back Perfeddwlad. By the Treaty of Montgomery of 1267, peace was restored and, in return for doing homage to the English king, Llywelyn was recognised as Prince of Wales and his re-conquest of Perfeddwlad was accepted by Henry. However, sporadic warfare between Llywelyn and some of the Marcher Lords, such as Gilbert de Clare, Roger Mortimer and Humphrey de Bohun continued.
Question: How many Welsh principalities survived?
Answer type: Number
3.