Computing Rule-Based Explanations by Leveraging Counterfactuals