Semiparametric Counterfactual Regression