Infect (CR 702.90) causes a source with infect to deal damage to players in the form of poison counters instead of loss of life. However, this only applies to damage that is actually dealt. Prevention effects stop damage before it is dealt (CR 615.1), meaning prevented damage never exists as far as game effects are concerned.
CR 702.90b states that damage dealt to a player by a source with infect causes that player to get that many poison counters. The critical word is 'dealt.' If 3 damage is prevented out of 5 total, only 2 damage is actually dealt, resulting in only 2 poison counters.
CR 615.4 confirms that if damage is prevented, the damage event never happens for that prevented portion — triggers, effects, and replacements that rely on damage being dealt simply do not apply to the prevented portion.
Example: Your opponent attacks with a 5/5 creature with infect. You cast Fog of War to prevent 3 of that damage. Only 2 damage is actually dealt to you, so you receive only 2 poison counters, not 5.
If all the damage is prevented (e.g., you have protection from the damage source's color), no damage is dealt at all and you receive zero poison counters.
Unofficial fan resource — not affiliated with or endorsed by Wizards of the Coast. Answers are AI-generated estimates grounded in the Comprehensive Rules and are not a substitute for an official judge. Verify anything match-critical.