Between 1519 and 1523 there was a succession of heavy battles and smaller skirmishes, in the course of which many towns and villages were devastated. After futile sieges of the defences of Calenberg and Hildesheim by troops from Hildesheim or Brunswick as well as numerous trails of devastation and plundering by both sides against the civilian population, the two sides finally met on 28 June 1519 at the Battle of Soltau . The Hildesheim army scored an emphatic victory against the Brunswick-Welf troops, killing some 3,500 men and capturing one of their leaders, Eric of Calenberg, as well as many of the nobles. This signalled the end of the opening phase of the war. However, an appeal to the newly elected emperor, Charles V, who had a good relationship with Wolfenbüttel, saw the situation entirely reversed at a political level. The ruling imposed by Charles V provided for the surrender of all conquered territory and release of all the prisoners, and thus ruled very much against the Hildesheim side. Because it was ignored by the bishop and his allies, the emperor's decision was followed in 1522 by the imposition of an imperial ban, the execution of which was assigned to the princes of Wolfenbüttel and Calenberg. Whilst Henry of Lüneburg had already gone into exile in France in 1520 having transferred the reins of power to his sons and in doing so keeping the Principality of Lüneburg out of the subsequent conflict, there were renewed military clashes between the Hildesheim prince-bishop and his opponents that were not finally resolved  until the so-called 'field peace'  of 15 October 1521. Hildesheim had won militarily, but lost politically.

Based on the above article, answer a question. How many years were there battles and skirmishes for?
4