If I sell a product and later discover it is counterfeit, is all the income from it considered Haram, or just the earnings obtained after I became aware of its counterfeit status?
Selling counterfeit products is unlawful (Haraam) and the income from it is also unlawful. You must return the money to the victims if you know them but if you can never know them, then you need to give the money as Majhool al-Malik (Unknown owner) to the Marje' of Taqleed who will give it to the poor believers on behalf of the owners.
Wassalam.