function countNum(str1, str2) { return str2.split(str1).length - 1 } console.log(countNum("a", "adfeadea")); //3