in Taiwan, and those who were not accompanied by wives or children, to enter Taiwan. Many of the male migrants married local indigenous women. Over the 18th century, restrictions on entering Taiwan were relaxed. In 1732, families were allowed to move to Taiwan, and in 1790, an office to manage cross-strait travel was established. By 1811 there were more than two million Han settlers in Taiwan and profitable sugar and rice production industries that provided exports to the mainland. In 1875, restrictions on entering Taiwan were repealed. Three counties nominally covered the entire western plains, but actual control was restricted to a smaller area. A government permit was required for settlers to go beyond the Dajia River at the mid-point of the western plains. Qing administration expanded across the western plains area over the 18th century, however this was not due to an active colonization policy, but a reflection of continued illegal crossings and settlement. The Taiwanese indigenous peoples were categorized by the Qing administration into acculturated aborigines who had adopted Han culture to some degree and non-acculturated aborigines who had not. The Qing did little to administer or subjugate them. When Taiwan was annexed, there were 46 aboriginal villages under its control, likely inherited from the Kingdom of Tungning. During the early Qianlong period there were 93 acculturated villages and 61 non-acculturated villages that paid taxes. The number of acculturated villages remained unchanged throughout the 18th century. In response to the Zhu Yigui uprising, a settler rebellion in 1722, separation of aboriginals and settlers became official policy via 54 stelae used to mark the frontier boundary. The markings were changed four times over the latter half of the 18th century due to continued settler encroachment. Two aboriginal affairs sub-prefects, one for the north and one for the south, were appointed in 1766. During the 200 years of Qing rule in Taiwan, the plains aborigines rarely rebelled against the government and the mountain aborigines were left to their own devices until the last 20 years of Qing rule. Most of the rebellions, of which there were more than 100 during the Qing period, were caused by Han settlers. More than a hundred rebellions, riots, and instances of civil strife occurred under the Qing administration, including the Lin Shuangwen rebellion (1786–1788). Their frequency was evoked by the common saying "every three years an uprising, every five years a rebellion" (三年一反、五年一亂), primarily