function quoteCount(string) {
  var count = 0;
  var index = 0;

  while ((index = string.indexOf('"', index)) !== -1) {
    count++;
    index++;
  }

  return count;
}
function quoteCount(string) {
  var count = 0;
  var index = 0;

  while ((index = string.indexOf('"', index)) !== -1) {
    count++;
    index++;
  }

  return count;
}
function quoteCount ( string ) { var count = 0 ; var index = 0 ; while ( ( index = string . indexOf ( '"' , index ) ) !== - 1 ) { count ++ ; index ++ ; } return count ; }
Count the number of quotes in a string.
@private
Count the number of quotes in a string .