In 1617 the first census was organised in the County of Glatz. The city itself had approximately 1,300 houses and over 7,000 inhabitants. However, two years after the census took place the Thirty Years' War started. Between 1619 and 1649 the fortress was besieged several times. Although the fortress was never captured, the city itself was largely destroyed. Over 900 out of 1,300 buildings were destroyed by fire and artillery and the population dropped by more than a half. After the war the Austrian authorities put an end to all local self-government, and the County of Glatz existed in name only. The city was gradually converted into a small garrison town attached to the ever-growing fortress.