c# solution | beats 100%
116 ms, faster than 100.00% of C# online submissions\n\n\npublic class Solution {\n    public int CountMatches(IList<IList<string>> items, string ruleKey, strin
**116 ms, faster than 100.00% of C# online submissions**\n\n```\npublic class Solution {\n    public int CountMatches(IList<IList<string>> items, string ruleKey, string ruleValue) {\n        \n        Dictionary<string, List<string>> itemsAsList = new Dictionary<string, List<string>>(){\n            {"type", new List<string>()},\n            {"color", new List<string>()},\n            {"name", new List<string>()}\n        };\n        \n        foreach(List<string> item in items){\n            \n            itemsAsList["type"].Add(item[0]);\n            itemsAsList["color"].Add(item[1]);\n            itemsAsList["name"].Add(item[2]);\n            \n        }\n        \n        return itemsAsList[ruleKey].Count(x => string.Equals(ruleValue, x));\n    }\n}\n```
['C']