code: @Nonnegative
    public static int getOccurrenceCount (@Nullable final String sText, @Nullable final String sSearch)
    {
      int ret = 0;
      final int nTextLength = getLength (sText);
      final int nSearchLength = getLength (sSearch);
      if (nSearchLength > 0 && nTextLength >= nSearchLength)
      {
        int nLastIndex = 0;
        int nIndex;
        do
        {
          // Start searching from the last result
          nIndex = getIndexOf (sText, nLastIndex, sSearch);
          if (nIndex != STRING_NOT_FOUND)
          {
            // Match found
            ++ret;
  
            // Identify the next starting position (relative index + number of
            // search strings)
            nLastIndex = nIndex + nSearchLength;
          }
        } while (nIndex != STRING_NOT_FOUND);
      }
      return ret;
    }
docs: Count the number of occurrences of sSearch within sText.
  
  @param sText
  The text to search in. May be <code>null</code>.
  @param sSearch
  The text to search for. May be <code>null</code>.
  @return A non-negative number of occurrences.