<p>You are given an array <code>items</code>, where each <code>items[i] = [type<sub>i</sub>, color<sub>i</sub>, name<sub>i</sub>]</code> describes the type, color, and name of the <code>i<sup>th</sup></code> item. You are also given a rule represented by two strings, <code>ruleKey</code> and <code>ruleValue</code>.</p>
<p>The <code>i<sup>th</sup></code> item is said to match the rule if <strong>one</strong> of the following is true:</p>
<ul>
<li><code>ruleKey == "type"</code> and <code>ruleValue == type<sub>i</sub></code>.</li>
<li><code>ruleKey == "color"</code> and <code>ruleValue == color<sub>i</sub></code>.</li>
<li><code>ruleKey == "name"</code> and <code>ruleValue == name<sub>i</sub></code>.</li>
</ul>
<p>Return <em>the number of items that match the given rule</em>.</p>
<strong>Explanation:</strong> There are only two items matching the given rule, which are ["phone","blue","pixel"] and ["phone","gold","iphone"]. Note that the item ["computer","silver","phone"] does not match.</pre>