code: public static long countSubstr(final String value, final String subStr, final boolean caseSensitive,
                                     boolean allowOverlapping) {
          validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
          return countSubstr(caseSensitive ? value : value.toLowerCase(), caseSensitive ? subStr : subStr.toLowerCase(),
                  allowOverlapping, 0L);
      }
docs: Count the number of times substr appears in value
  
  @param value            input
  @param subStr           search string
  @param caseSensitive    whether search should be case sensitive
  @param allowOverlapping boolean to take into account overlapping
  @return count of times substring exists