I am counting the occurrence of specific keypairs in a word
console.log("acceptable".match(/ab|ac|ar/gi).length); //2
(picture) Exa