Very simple and easy to understand.
Code
![image.png](https://assets.leetcode.com/users/images/bfb147bd-eed0-4317-87a8-cbfa0dd3f9f1_1734065563.486356.png)\n\n\n# Code\n```python3 []\nclass Solution:\n    def countMatches(self, items: List[List[str]], ruleKey: str, ruleValue: str) -> int:\n        rule =["type", "color", "name"]\n        rule_index= rule.index(ruleKey)\n        count=0\n        for item in items:\n            if item[rule_index] == ruleValue:\n                count += 1\n        return count\n```
['Python3']