Need Help With Array System

Currently got a working item system and i would like to know whats the best way to check if i have a certain value of for example 3 different items to craft something Ex: 3 metal, 2 wood, 3 cloth?

Get length from each itemArray and branch if metal is equal or more than 3 for example.