code: public static int count(final String str, final String... set) {
          if (StringUtils.isEmpty(str) || deepEmpty(set)) {
              return 0;
          }
          final CharSet chars = CharSet.getInstance(set);
          int count = 0;
          for (final char c : str.toCharArray()) {
              if (chars.contains(c)) {
                  count++;
              }
          }
          return count;
      }
docs: <p>Takes an argument in set-syntax, see evaluateSet,
  and returns the number of characters present in the specified string.</p>
  
  <pre>
  CharSetUtils.count(null, *)        = 0
  CharSetUtils.count("", *)          = 0
  CharSetUtils.count(*, null)        = 0
  CharSetUtils.count(*, "")          = 0
  CharSetUtils.count("hello", "k-p") = 3
  CharSetUtils.count("hello", "a-e") = 1
  </pre>
  
  @see CharSet#getInstance(java.lang.String...) for set-syntax.
  @param str  String to count characters in, may be null
  @param set  String[] set of characters to count, may be null
  @return the character count, zero if null string input