How to counter a heartbeat sensor?
Solution 1:
The Assassin perk keeps you off of enemy heartbeat sensors, thermal scopes, and UAV. The pro version also gives you immunity to EMP and Counter-UAV, and makes it so that your name and red crosshairs don't show up if an enemy has you in their sights.
I'll also add that EMP grenades and the EMP killstreak reward disable enemy heartbeat sensors, but only for the duration of the EMP effect.