Use PHP's count:
<?php
$link = file_get_contents('http://api.steampowered.com/IEconItems_440/GetPlayer Items/v0001/?key=&SteamID=&format=json');
$myarray = json_decode($link, true);
echo count($myarray['result']['items']);
?>
EDIT: To count ones with a specific property you'll have to loop through all of them and increment a variable:
<?php
$link = file_get_contents('http://api.steampowered.com/IEconItems_440/GetPlayer Items/v0001/?key=&SteamID=&format=json');
$myarray = json_decode($link, true);
$count = 0;
foreach($myarray['result']['items'] as $item){
if($item['defindex'] == 267){//or whatever you're looking for
$count++;
}
}
echo $count;
?>