code: function count(str, substr, start, end) { var result, pos
          function next(){ return find(str, substr, pos + 1) }
          if (start != null)  str = slice(str, start, end)
  
          result = 0
          pos    = -1
          while (~(pos = next()))  result++
          return result
      }
docs: /// Function count ///////////////////////////////////////////////////////  (str:Str, substr:Str[, start:Num][, end:Num]) ↦ Num  Counts the number of ocurrences of a substring.  If start and end are given, only that small part of the string will be searched.