It’s an easy enough question but not one that is easy to answer given the variety of historic properties - from fairytale turreted piles to commanding fortresses - scattered across the land.

Estimates of castle numbers have varied wildly between 2,000 to over 4,000.

Craigievar Castle in Aberdeenshire was built during the death of the castle era, according to an expert. PIC: Neil Williamson/Creative Commons/Flickr

Higher estimates tend to include castles where remains are no longer visible and country houses where the castle tag has been added for fashion or prestige. Any serious tally of the number of castles in Scotland has to look at those that meet the true purpose of such properties - to defend it residents against attack.

David Weinczok, the self-styled Castle Hunter who has moved from Canada to Scotland to pursue his interest in their historic properties, said he used two key criteria to define a castle. They had to be a domestic residence - “at least the home of a minor laird” - and a defensive structure.

His count would also include remains that are visible - even if that were just “a couple of stones in a field,” he added.

Mr Weinczok estimated there were around 2,000 castles in Scotland that met this criteria with the properties generally built between the 1100s and early 1600s.

“To my mind, a castle has to be able to put up a fight,” he said.

“I have something that I call the SWAT test. When you look at a building, and it doesn’t matter if it is now a ruin, would a SWAT team have a good chance of breaking in?

“If you think the building would give them a headache, then sure, then it is a castle,” Mr Weinczok said.

“During the 1600s, there are great number of country homes or chateaux-style properties being built. They defensive structure of the property is not the point here - they are purely for show.

He said would include one of Scotland’s most photographed castles, Craigievar in Aberdeenshire , which is well known for its pink exterior and fancy flourishes, in this category.

Built by William Forbes, an Aberdeen merchant who prospered through trading with the Baltic states, Craigievar was completed in 1626.

Mr Weinczok, said: “I think of the early 1600s as the death of the castle age. The King served more centrally and nation states were starting to emerge. Craigievar fits into that period when people are building towers not expecting the King to turn up and lay siege.”

“The feudal world was starting to give way to an early modern era when there was a centralisation of power rather than lots of local centres of power.”

He added that improvements in military artillery, which rendered the defensive abilities of fortified residences less powerful, and changes in tastes brought to an end the castle era.

By the early 1700s, there were very few families really living in castles, Mr Weinczok added.

Historic Environment Scotland said there were around 500 listed or scheduled structures that could be described as a masonry medieval fortified dwelling.

In addition, there are 135 mottes - early earth and timber castles - and 12 moated sites that have historic protection.

More properties which could be classed as castles do exist, but are not protected in the same way, the public body said.