Counterterrorism: A Public Goods Approach