Exact Item Count Dispenser

This customizable item counter circuit dispenses or drops an exact, pre-set number of items every time you press a button. It is ideal for multiplayer shops, automated kitchens, or potion stations where you need to hand out precise quantities on demand. Best of all, its dual-read hopper design lets you press the button again immediately after a cycle finishes without waiting for the timer to reset.

Item CircuitsIntermediateJava Edition
Exact Item Count Dispenser video tutorial

Video: How to Dispense a Specific Number of Items by Cooltwo

How to build it

  1. Build the Copper Bulb T Flip-Flop

    Place a copper bulb with a button attached to it (or run a redstone input line into the bulb). Place a comparator facing away from the copper bulb and running directly into a solid building block.

  2. Set Up the Alternating Pistons

    Place a sticky piston on top of the block powered by the comparator, facing horizontally along the build, with a solid block on its face. Attach a redstone torch to the side of that base block, run a short line of redstone dust to a second base block a few spaces over, and place a second sticky piston with a solid block on top of it facing the same direction (one piston will be extended while the other is retracted).

  3. Install the Hopper Locking Torches

    Place solid blocks alongside the redstone wire between your two pistons and attach two redstone torches so they sit adjacent to the spaces where the pistons push their blocks. These torches will lock one hopper while the piston block cuts off or allows the signal on the other side.

  4. Place the Counting Hoppers

    Place two hoppers directly facing into each other so items can transfer back and forth between them. Position them right next to the locking torches and piston blocks so that only one hopper is unlocked at any given time.

  5. Read the Hoppers with Comparators

    On the opposite side of the two hoppers, place two comparators pointing away from the hoppers into the spaces where the sticky pistons push their solid blocks. Because only one piston is extended at a time, only the currently draining hopper's comparator signal will pass through a solid block.

  6. Combine the Timer Outputs

    Place two redstone repeaters on the far side of the piston-pushed blocks to pull the signal out of whichever block is currently extended. Merge the output of both repeaters into a single line of redstone dust.

  7. Build the Subtract-Mode Clock

    Run the merged redstone wire into the back of a comparator and right-click the comparator to put it into subtract mode (front torch lit). Loop the output of this comparator back into its own side input using redstone dust and a 1-tick repeater so it pulses at the exact same speed as a hopper transfers items.

  8. Connect the Dropper and Load Items

    Place your dropper (or dispenser) next to the pulsing redstone clock wire and fill it with the stock you want to give out. Finally, put dummy items into one of the counting hoppers equal to the exact amount you want dispensed plus one extra item.

How it works

This contraption splits the job into three distinct modules: a T flip-flop input, a bidirectional hopper timer, and a comparator clock.

  • Copper Bulb T Flip-Flop: Pressing the button toggles the copper bulb on or off. The comparator reading the bulb converts a momentary button press into a persistent state change, flipping the circuit between two modes every time it is pressed.
  • Zero-Reset Hopper Timer: The two hoppers point into each other. Thanks to the redstone torch inverter between the two sticky pistons, one piston is always extended while the other is retracted, and one hopper is always locked by a redstone torch while the other is unlocked. When you press the button, the states swap: the full hopper unlocks and begins pushing its items into the empty hopper. At the same time, the sticky piston on the active hopper's side pushes a solid block in front of its comparator, allowing the signal to pass through to the repeaters until that hopper is completely empty.
  • Synchronized Subtract Clock: While items are draining from the active hopper, the merged repeater output powers a comparator in subtract mode. With a repeater in its feedback loop, the clock pulses once per item transferred. For a double-speed version that dispenses even numbers, replace the feedback repeater with plain redstone dust—the clock will fire twice for every single item moved in the hopper timer.

Tips & variations

  • Item Count Formula (N + 1): Due to signal delay,always place one more item in the counting hopper than you want to dispense. For example, to dispense 7 items, put 8 items into the hopper.
  • Double-Speed Even Mode: If you only need to dispense even quantities (like 14 items), replace the repeater in the comparator subtract clock loop with redstone dust. Each item in the hopper (minus one) will now trigger two pulses instead of one, dispensing twice as fast.
  • Don't Forget Subtract Mode: If your dropper only fires once and stops, check the clock comparator at the end of the build and make sure its front torch is turned on (subtract mode).
  • Dropper vs. Dispenser: Use a dropper if you want to hand items like food or blocks intact to a player; use a dispenser if you want to fire projectiles, equip armor, or place water.

Frequently asked questions

How do I change how many items are dispensed?
Add or remove items inside the two counting hoppers. In the standard version with a repeater in the clock, the dropper will dispense the total number of items in the hopper minus one.
Do I have to wait for the hoppers to reset before pressing the button again?
No. Because both hoppers have their own comparator and piston gate, the circuit alternates which hopper it reads from each time you press the button, allowing back-to-back dispensing with zero cooldown.
How do I make the items dispense twice as fast?
Remove the redstone repeater from the comparator subtract clock loop and replace it with redstone dust. Note that the fast version can only dispense even numbers of items (2x the hopper count minus 1).

Components used

More item counter