Counterfactual Generation with Identifiability Guarantees