Minecraft bedrock items quantity selector

I have an automatic dropper in Minecraft that drops diamond ores. These diamond ores will be teleported to a specific position when a player mines a diamond there. I made some experiments on it. I also figured out how to select a specific limit of entities (with the c selector). I have:

An auto dropper, with a command block continuously replacing a slot of it with diamond ores.

These diamond ores are killed every 100 ticks by a repeating command block right under the place they are about to drop.

For the last one to work, I need the items to be in a single block. All of them. So I built a wooden wall around them.

Then I have a command chain starting with /testforblock <x> <y> <z> air, then it is supposed to teleport a single item to the position where the diamond ore is and kill the original diamond that drops. After this, it rebuilds the diamond ore.

My problem is: The diamond ores (and all the items) merge when they touch each other. That means they become more. E.g. When two diamond ore items are touching each other, they merge into a single entity that gives the player who picks it up 2 diamond ores.

My question is: Can I select a specific amount of single items and not single entities? If so, how can I achieve this?


So I figured out how to do this. I made a 1 x 1 block structure (via structure blocks) with just single diamond ore in it. Then, every time the player mined the ore, it built the structure right where the ore is located and then killed all the normal diamonds in that area (if there are some).