public int matchComponentCount() {
      return (matchPattern.startsWith("$")
        ? matchPattern.substring(1)
        : matchPattern).split("\\$").length;
    }
Get the match component count. This is the number of components that are evaluated
when attempting to match a principal to the rule.
ambari-server/src/main/java/org/apache/ambari/server/controller/AuthToLocalBuilder.java