Use the "Call script" event command and type:
$game_variables[X] = $game_party.item_number(Y)
X is the variable ID and Y is the ID of the item. You can also check weapons and armors:
$game_variables[X] = $game_party.weapon_number(Y)
$game_variables[X] = $game_party.armor_number(Y)