Add regex logic for counting pylint violations.