Why do strong players count defenders around the general so carefully?
These answers restate the rules implemented by our open-source engine, which follows the WXF laws and is regression-tested against the official 110-diagram repetition casebook. Where an answer refers to a specific position, that position lives on the linked reference page, where the build verifies it against the engine before publishing.
Direct answer
Because xiangqi attacks are, at bottom, arithmetic. The general has a fixed nine points, the escape squares are countable, and whether an attack lands usually comes down to how many attackers can reach the palace against how many defenders can arrive in time. Strong players run that count automatically, on nearly every move near either palace.
What the count actually looks like
How many of your pieces are within three moves of the enemy general, against how many of the defender's pieces are within three moves of getting back to help. If your number is bigger, an attack is probably worth starting; if it is smaller, it is probably premature.
Why this habit separates strong players from improving ones
Weaker players tend to react to each threat individually as it appears, while stronger players plan around the count itself, trading to shift the ratio in their favour before committing to a specific attacking sequence, much like tracking danger to your own general before it becomes a concrete threat.
Related questions
Is this counting exact, or more of a rough guide?
Rough but reliable; the precise calculation still needs checking, but the count tells you whether it is worth doing at all.
Does material matter less than this count?
Not less, but differently; material only helps if it survives long enough to be used, which is exactly what this count is checking.