It’s unfortunate to have to say this, but sometimes home sellers and contractors will hide the amount of layers of shingles that are on a house with a special trim piece and sometimes you can’t tell until you start ripping the existing roof off. This is more common on older homes (pre-1950).
Wisconsin law requires that homes have a maximum of 2 layers. This is not just a trivial law — homes are made with wood structure walls that are only rated to handle so much weight. Houses that exceed what they are structurally designed to accommodate can have walls that bow out, creating problems with siding and in cases of houses with a masonry exterior, can cause the brick or stone to pull away from the building, creating a safety hazard.
Standard roofing nails are 1-1/4″ long. Some roofs, and in these cases the roofer knew exactly what they were doing and that what they were doing was sneaky, additional layers are added that require longer nails if there is any hope that the non-conforming shingle application will stay on the roof.
Understand that there are multiple types of roofing, and that an asphalt shingle should never be installed over a cedar shake shingle. Todays shingles are made to go onto flat surfaces in order to maximize how long they will last. Since most homeowners today are choosing architectural, sometimes called dimensional shingles, the additional thickness makes it so that you can tell if a second layer has been put over a dimensional shingle. If you are buying a house and the shingles look a little wavy or bumpy, buyer beware.
You can plan for everything but if someone is deliberately trying to hide an inappropriate installation, they may succeed and even a traditional home inspector may not catch it until long after the new homeowner has closed on the house and all the documents have been signed.