Counter target spell that targets a permanent you control.
If the permanent you control targeted by the target spell leaves the battlefield, that spell is no longer a legal target for Rebuff the Wicked. On the other hand, if that targeted permanent becomes an illegal target for the target spell but remains on the battlefield under your control, the target spell is still a legal target for Rebuff the Wicked.
Rebuff the Wicked can target a spell that has multiple targets, as long as at least one of those targets is a permanent you control.