How many terrorists had to be killed upfront in their country to reach that result ?

None.

Violence was, at best, counterproductive for all parties involved. It often led to further tit-for-tat killings and, more generally, piled up more layers of grievance that hardened attitudes and formed a barrier to de-escalation.

The cycle was instead brought to an end by a decade of trust-building and painful negotiation. Violence didn't help, and wasn't part of the solution.