This is the reason that tech companies seek to acquire large rather than technically sound patent portfolios.
Briefly: defense against infringement runs around $1-$10 million per patent )(it may be higher, my information's somewhat dated). Defeat one patent, and the company with the larger portfolio presses suit with another, and another. Even if the plaintiff successfully defends itself against these suits, it's still out $1-$10 million per patent. Often far better to strike a licensing deal for $40k (or some value less than $1-$10m).
It's possible to countersue, and this happens, usually with the result that the companies reach a cross-licensing arrangement.