scoreboard players add #counter StorageCount 1
scoreboard players operation @s StorageCount = #counter StorageCount

summon chest_minecart 0 -64 0 {NoGravity:1b,Silent:1b,Invulnerable:1b,Tags:["custom_storage","custom_storage_init"]}
execute store result score @e[type=chest_minecart,tag=custom_storage_init,limit=1] StorageCount run scoreboard players get @s StorageCount
tag @e[type=chest_minecart,tag=custom_storage_init,scores={StorageCount=0..}] remove custom_storage_init