Rust with match and filter
Pretty simple:\n\n\npub fn count_matches(items: Vec<Vec<String>>, rule_key: String, rule_value: String) -> i32 {\n        let keyIndex = match &rule_key[..] {\n
Pretty simple:\n\n```\npub fn count_matches(items: Vec<Vec<String>>, rule_key: String, rule_value: String) -> i32 {\n        let keyIndex = match &rule_key[..] {\n            "type" => 0,\n            "color" => 1,\n            "name" => 2,\n            _ => return 0\n        };\n\n        items\n            .iter()\n            .filter(|item| item[keyIndex] == rule_value)\n            .count() as i32\n    }\n\t```
['Rust']