If either one of the target creatures becomes an illegal target (because it left the battlefield or for any other reason), the counter doesn’t move. If both targets become illegal, the ability doesn’t resolve.