Enhancing Programming Concepts Understanding in LLMs via Automated Counterfactual Code Augmentation