function countOccurences(s: string, word: string) : number {
return s.split(word).length - 1
}
const s: string = "typescript c python php c++ typescript php c# typescript typescript";
const word: string = "typescript";
console.log(countOccurences(s, word));
/*
run:
4
*/