original_string: public static function count($string = false, $selector = false) {
  
          if ($string) {
  
              switch ($selector) {
                  case 'words':
                      return str_word_count($string);
                  default:
                      if (self::substring($selector, 0, 1) === ':') {
                          return substr_count($string, self::substring($selector, 1));
                      }
                      return self::length($string);
              }
          }
  
          return false;
      }
code: public static function count($string = false, $selector = false) {
  
          if ($string) {
  
              switch ($selector) {
                  case 'words':
                      return str_word_count($string);
                  default:
                      if (self::substring($selector, 0, 1) === ':') {
                          return substr_count($string, self::substring($selector, 1));
                      }
                      return self::length($string);
              }
          }
  
          return false;
      }
code_tokens: public static function count ( $ string = false , $ selector = false ) { if ( $ string ) { switch ( $ selector ) { case 'words' : return str_word_count ( $ string ) ; default : if ( self :: substring ( $ selector , 0 , 1 ) === ':' ) { return substr_count ( $ string , self :: substring ( $ selector , 1 ) ) ; } return self :: length ( $ string ) ; } } return false ; }
docstring: Get string length, number of words or the occurences of specific word.
  @param string full string
  @param string selector
  @example count('hello world') - will return length of string which is 11
  @example count('hello world', 'words') - will return number of words which is 2
  @example count('hello world', ':hello') - will return number of occurences of string 'hello' which is 1
  @return boolean
docstring_tokens: Get string length number of words or the occurences of specific word .