Counterintelligence is Information gathered and activities conducted to protect against espionage, other intelligence activities, sabotage, or assassinations conducted by or on behalf of foreign governments or elements thereof, foreign organizations, or foreign persons, or international terrorist activities. (Dictionary of Military & Associated Terms)
Counterintelligence has both a defensive mission - protecting the nation's secrets and assets against foreign intelligence penetration - and an offensive mission - finding out what foreign intelligence organizations are planning to better defeat their aims. (From www.dni.gov)