Easy one liner solution
\n# Code\n\nfunction countPrefixes(words: string[], s: string): number {\n    return words.filter((word) => s.startsWith(word)).length;\n};\n
\n# Code\n```\nfunction countPrefixes(words: string[], s: string): number {\n    return words.filter((word) => s.startsWith(word)).length;\n};\n```
['TypeScript', 'JavaScript']