one line solution
\n\n# Code\n\nclass Solution:\n    def countPrefixes(self, words: List[str], s: str) -> int:\n       return sum(1 for x in words if s.startswith(x))\n
\n\n# Code\n```\nclass Solution:\n    def countPrefixes(self, words: List[str], s: str) -> int:\n       return sum(1 for x in words if s.startswith(x))\n```
['Python3']