Easy Solution
\n\n# Code\n\nclass Solution {\n    public int countMatches(List<List<String>> items, String ruleKey, String ruleValue) {\n      int count=0;\n      for(int i=0
\n\n# Code\n```\nclass Solution {\n    public int countMatches(List<List<String>> items, String ruleKey, String ruleValue) {\n      int count=0;\n      for(int i=0;i<items.size();i++){\n          if(ruleKey.equals("type") && ruleValue.equals(items.get(i).get(0)))   count++;\n          else if(ruleKey.equals("color") && ruleValue.equals(items.get(i).get(1))) count++;\n          else if(ruleKey.equals("name") && ruleValue.equals(items.get(i).get(2)))  count++;\n      }\n        return count;\n    }\n}\n```
['Java']