In the previous chapter Sun Tzu ranked the kinds of victory. Attacking the plan is best, he said, and attacking a walled city is worst. But what decides which method you use.
His answer is counting. Very specific counting.
十則圍之,五則攻之,倍則分之,敵則能戰之,少則能逃之,不若則能避之
shi ze wei zhi, wu ze gong zhi, bei ze fen zhi, di ze neng zhan zhi, shao ze neng tao zhi, bu ruo ze neng bi zhi
Ten to one, surround. Five to one, attack. Two to one, divide them. Evenly matched, fight. Fewer, withdraw. Outmatched, avoid. (The Art of War, Attack by Stratagem, translated directly)