private static int count(String pattern,String[] possibleValues){
  int count=0;
  for (  String r : possibleValues) {
    if (pattern.contains(r)) {
      count++;
    }
  }
  return count;
}

private static int count ( String pattern , String [ ] possibleValues ) { int count = 0 ; for ( String r : possibleValues ) { if ( pattern . contains ( r ) ) { count ++ ; } } return count ; }
count the amount of renamer tokens per group
