It would take 10 damage from the poison and then you would remove 2 damage counters and then check for KO's. Checking for KO's is the last thing that you always do in any particular phase of a game (attack, in-between, etc.) All abilities and conditions will take place before you check for KO's.