code: function (str, token) {
              var total = 0, i;
              while ((i = str.indexOf(token, i) + 1)) {
                  total++;
              }
              return total;
          }
docs: Count and return the number of occurrences of token in str
  @param   {string} str   The string to search
  @param   {string} token The string to search for
  @returns {int}          The number of occurrences