Counterfactual Explanations Using Optimization With Constraint Learning