code: public static int count(final String host, final char charactor) {
      int count = 0;
      for (int i = 0; i < host.length(); i++) {
        if (host.charAt(i) == charactor) {
          count++;
        }
      }
      return count;
    }
docs: count char in host string
  
  @param host
  a {@link java.lang.String} object.
  @param charactor
  a char.
  @return a int.