Your opponent plays Counterespionage (CS), names Intrusion Countermeasures Software
(ICS), and looks at your hand.
As Counterespionage would actually cause you to scrap the copy of ICS you have in hand, we assume you reveal the copy you have in play. ICS then resolves and makes it impossible for your opponent to scrap the ICS in your hand. Instead that part of the effect is replaced by the card drawing effect, and you draw two. This is because the effect of a secret action resolves when the card is revealed, and does not depend on whether the card remains in play or not.