Less memory usage 99%
```\nclass Solution:\n    def countMatches(self, items: List[List[str]], ruleKey: str, ruleValue: str) -> int:\n        types = [item[0] for item in items]  \n 
```\nclass Solution:\n    def countMatches(self, items: List[List[str]], ruleKey: str, ruleValue: str) -> int:\n        types = [item[0] for item in items]  \n        color = [item[1] for item in items]  \n        names = [item[2] for item in items]\n        if ruleKey == \'name\':\n            return names.count(ruleValue)\n        elif ruleKey == \'color\':\n            return color.count(ruleValue)\n        else:\n            return types.count(ruleValue)
['Python']