Add a method in the PatternExtraction class to count the number of output variables for a Working Pattern.