Int Video Count
Count how many videos you actually plugged in
- video_1
- int
Int Video Count does one thing, and the name isn't hiding anything: it counts how many VIDEO inputs actually have a connection and hands you that number as an INT. It's the video sibling of this pack's Int Image Count, minus the cleverness. If that sounds almost embarrassingly simple, it is - and it's genuinely useful in exactly one situation: workflows where the number of videos is allowed to vary.
Why you'd bother
The killer case is a reusable workflow template with optional reference videos. Say you built a pipeline that can accept one, two, or three reference clips (driving poses, style references, whatever your video model eats), and downstream logic needs to know how many are actually present to pick a path, size a batch, or feed a loop. That's a conditional you'd otherwise hack together with hand-wired "is empty" checks per port. This node collapses the whole question into a single integer you can feed straight into an Int Number Compare or a switch.
The same author's Int Image Count inspects the actual image tensors (skipping empty and all-zero frames). This one is lazier on purpose - it only asks "is something plugged in or not." That's usually what you want for "how many optional inputs did the user wire up," but it's worth knowing the difference: a connected but empty video still counts as 1. If you need "is there real content here," this isn't that node.
Inputs and outputs
The schema lists exactly one input, video_1 (VIDEO, optional) - but the pack's frontend extension grows the port list as you go. Connect to the last video_X port and a new video_2, then video_3, etc. appears; disconnect it and the trailing empties get trimmed. The node collects every video_N input, sorts them by numeric suffix, and counts the non-None ones. That's the entire mechanism, straight from the source - no frame inspection, no decoding, no math.
The single output is int, the number of connected videos. Wire it into anything that wants a count: an Int Number Compare, a batch-count input, a Text Compare gate, whatever.
Install
Same as any custom node. Easiest route is ComfyUI Manager: Custom Nodes Manager → search "1hewNodes" → Install, then restart ComfyUI. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/1hew/ComfyUI-1hewNodes
then restart. This node itself needs nothing extra - no model downloads, no torch imports beyond what ComfyUI already has. The catch is the pack: ComfyUI-1hewNodes ships with a heavy requirements.txt (opencv, scikit-image, scikit-learn, psd-tools, ultralytics, transformers, rembg, transparent-background...). Those are for the pack's other nodes, and ComfyUI Manager will install them all on a fresh clone. Expect a slower first startup and the occasional dependency conflict in an environment that already has its share of packages - that's the standard price of living in the custom-node ecosystem, not this pack being special.
Common issues
- The count is only as honest as your wires. It reflects connected ports at execution time, and because the frontend trims trailing empty ports, you won't get phantom counts from leftover slots. If the number looks wrong, check for a port you thought was connected but isn't.
- Count ≠ content. As noted above, any non-
Nonevideo counts as one. A zero-frame or failed video still registers. If you're gating real work on this count, pair it with a content check. - Don't install the whole pack for this one node. It's a nice convenience, but the pack is a sprawling ~100-node utility collection. If you only want this counter, a tiny custom node or even a
Load Videowired through a condition might be less baggage.
Honest verdict: it's a trivial node you'll reach for in template-building moods and forget between times. But when you need a count-driven workflow, having it beats hand-rolling the same logic for the tenth time.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| video_1opt | VIDEO | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| int | INT | — |