nl_tokens: Returns the number of occurences of what
pl_tokens: function occurrencesOf ( obj , what ) { if ( arguments . length < 2 ) return 0 ; if ( typeof obj === 'boolean' ) { return 0 ; } if ( typeof obj === 'number' ) { return occurrencesOf ( obj . toString ( ) , what ) ; } else if ( typeof obj === 'function' ) { return occurrencesOf ( fixFirefoxFunctionString ( obj . toString ( ) ) , what ) ; } var count = 0 ; if ( typeof obj === 'string' ) { if ( typeof what === 'string' || typeof what === 'number' ) { var regexp = <mask> RegExp ( what . toString ( ) , 'g' ) , m ; while ( m = regexp . exec ( obj ) ) count ++ ; // jshint ignore:line } } else if ( typeof obj !== 'string' ) { libs . object . every ( obj , function ( item ) { if ( item === what ) count ++ ; } ) ; } return count ; }