Board vision and material safety
Count real defenders
Before counting a defender, play the capture in your head and ask whether that defender can legally recapture. An absolute pin can make an apparent defender useless for that particular move.
Worked example
Position in text
White to move. White: bishop f5, rook e1, king g1. Black: king e8, knight e7, knight g6.
FEN: 4k3/4n3/6n1/5B2/8/8/8/4R1K1 w - - 0 1
Black’s knight on e7 covers g6 in the geometric sense. But the rook on e1 pins it to the black king on e8. White can play 1.Bxg6+; 1...Nxg6 is not legal. Leaving e7 would let the rook check down the e-file even if the knight stopped the bishop’s check.
The e7 knight still attacks g6 for the purpose of king safety. This example uses a bishop, not a king, to take there.
A plausible mistake
Do not simply delete pinned pieces from the attack map. For an ordinary exchange you are counting legal captures, but for a king move an attack by a pinned piece still matters. Also, a pinned slider can sometimes move along the pin line without exposing its king.
Try it yourself
Position in text
White to move. White: knight f4, rook b1, king h1. Black: king b8, knight b6, bishop d5.
FEN: 1k6/8/1n6/3b4/5N2/8/8/1R5K w - - 0 1
White’s knight on f4 can capture the bishop on d5. The black knight on b6 appears to guard it. Can Black answer 1.Nxd5 with 1...Nxd5?
Check your answer
No. The b6 knight is the only blocker between White’s rook on b1 and Black’s king on b8. Its jump to d5 would expose its own king to check. The bishop has no legal recapture in this position.