Is there a simple way to check how many times a character appears in a String?
var s = "dqsskjhfds"; alert(s.length - s.replace(/a/g, "").length); // number of 'a' in the string