$execute store result score %count svm_ep.numbers if items entity @s container.* $(item) 
$execute unless score %count svm_ep.numbers matches $(count).. run return run function svm_ep:system/message/not_enough_items {count:$(count),name:"$(name)"}



$clear @s $(item) $(count)
$scoreboard players add @s $(score) 1

function svm_ep:menu/unlock/upgrade_success