Key takeaway
- Object counting at the edge: how detection and tracking work, where it beats sensors and barcodes, governance, EU AI Act dates and a 3 to 5 year outlook.
AI object counting uses cameras and trained vision models to detect items, follow each one across frames and add them to a count, so a line, pallet or pack is counted without manual tallies or fixed sensors. Running the model on a device near the camera keeps the count live on the line and reduces the video that has to leave the site. This guide is for leaders and architects deciding where counting by vision beats the older methods, and where it does not.
It sits next to our guides on computer vision on edge, edge video analytics architecture and real-time object detection at the edge: those cover models, architecture and detection, while this post covers counting as an operational control for manufacturing, packaging and warehousing. It also shows how to govern the counts, because a number that triggers a reorder or a hold on a batch is a decision input and needs an owner. Platform options are in our guide to edge computing platforms.
How does AI object counting work at the edge?
According to the Ultralytics object counting guide, a counting solution has three parts: a model that detects objects in each frame, a tracker that follows each object across frames so the same item is not counted twice, and a counter that tallies items crossing a line or entering a region. The guide lists conveyor belt packet counting, inventory management and industrial automation among its uses. At the edge, all three steps run on a device beside the camera and only the count and exceptions are sent on.
| Stage | What happens | What the enterprise should decide |
|---|---|---|
| Image acquisition | Cameras capture the line, pallet or pack | Camera position, lighting and frame rate for the fastest item |
| Preprocessing | Noise, brightness and size are normalised | Which conditions the model must cope with, such as glare or dust |
| Detection | A model such as a convolutional neural network finds each item | Training data for each product shape, size and pack type |
| Tracking | Each item is followed across frames so it is counted once | How overlap, occlusion and stacked items are handled |
| Counting rule | Items crossing a line or entering a region are tallied | Where the line sits and what counts as a valid pack |
| Integration | The count goes to the MES, WMS or alert system | Who owns a mismatch and what action it triggers |
Why do traditional counting methods fall short?
Manual counts, mechanical sensors, barcode or RFID scanning and conveyor counters each work in a narrow setting. The table sets out where each one stops being practical.
| Method | Where it works | Where it struggles |
|---|---|---|
| Manual counting | Small batches, no equipment needed | Slow, prone to human error, does not scale |
| Mechanical sensors | Uniform items passing a fixed point | Overlapping or irregular items, strict alignment, little flexibility |
| Barcode and RFID | Individually labelled items | Needs manual steps at speed; barcodes can be damaged and tags add cost |
| Conveyor-based counters | High volumes of similar items | Different shapes and sizes, unevenly spaced items |
Vision does not remove these limits everywhere. It adds a method that can handle varied shapes and overlap, at the cost of camera set-up, model training and monitoring.
Which counting approach fits which job?
| Job | Best-fit approach | When it fits | Watch for |
|---|---|---|---|
| Uniform parts at a fixed point | Mechanical or optical sensor | Shapes never change and alignment is stable | Format changes need re-setting |
| Individually labelled goods | Barcode or RFID | Every item carries a readable label | Damaged labels, tag cost, manual steps at speed |
| Mixed or irregular items, overlap | Vision with tracking | Shapes vary and items touch or overlap | Training data, lighting, model drift |
| Pallets and storage in a warehouse | Vision for cycle counts | Replacing scan-based cycle counting | Camera coverage and occlusion between racks |
| Count that must be auditable | Vision plus stored evidence | A miscount triggers a recall, reorder or hold | Retention policy and who can review images |
For the physical AI layer that runs such systems across sites, NexaStack is described on its site as an agentic operating platform for physical AI that runs across on-premises, cloud and hybrid environments.
Where does edge processing help, and where does it not?
Edge processing keeps detection and counting close to the camera. For a counting line the main gains are low delay between item and count, less video sent to the cloud, and counts that continue if the site link drops. It also lets one design be repeated across plants, which suits the smart factory programmes in our related guide and the wider edge computing estate.
| Edge benefit | Why it matters for counting | Limit |
|---|---|---|
| Local processing | The count is available as the item passes, so a line can be stopped or flagged | Needs hardware that suits the model and the frame rate |
| Less data transferred | Only counts and exceptions leave the site | Raw images still need a retention rule if kept as evidence |
| Repeatable design | The same pattern can be rolled out to more sites | Each site still needs its own camera set-up and tuning |
| Data stays on the local network | Fewer places where images can leak | Edge devices need patching, access control and monitoring |
Where is AI object counting used today?
| Sector | Typical counting task | What the count protects |
|---|---|---|
| Automotive | Components per assembly or kit | Complete assemblies and fewer defects |
| Food and beverage | Packaged items before dispatch | Correct case counts and labelling compliance |
| Pharmaceutical | Tablets in blister packs | Pack accuracy and compliance |
| Logistics and warehousing | Goods in transit and storage | Inventory accuracy and fewer losses |
| Electronics | Components during board assembly | Fewer assembly errors |
According to the Ultralytics object counting guide, similar counting is also used for fish counting, retail analytics and traffic management. Our edge and vision AI solutions page covers how XenonStack approaches these builds.
What governance, security and cost controls does counting need?
| Area | Control | Why |
|---|---|---|
| Accuracy | Hold-out test on real production images for each product and lighting condition; track error on a sample count | A model trained on one pack can fail on the next |
| Change | Version the model and the counting rule; re-test when packaging or lighting changes | Counts used in compliance reports must be explainable |
| Security | Segment cameras and edge devices, restrict access, patch and log | Devices at the edge widen the attack surface |
| Privacy | Avoid capturing people where only parts are counted; set retention for images | Cameras on a shop floor often see staff |
| Cost | Count cameras, devices, labelling and maintenance, not only licences | Training and upkeep are recurring work |
Where a count triggers an action such as a stock transfer or a batch hold, record who or what acted, on which count and under which rule. Elixir Govern (formerly AgentGRC) is described on its site as keeping autonomous agent actions inside policy, with the audit trail risk teams need. ElixirClaw is described on its site as an agentic OS platform to build, orchestrate and govern AI agents and automation workflows while keeping humans in control.
How should an enterprise adopt vision-based counting?
| Step | Action | Exit test |
|---|---|---|
| 1. Choose one count | Pick a count with a clear cost of error, such as a pack check or pallet count | Owner and current error cost agreed |
| 2. Capture real images | Collect images across shifts, products and lighting | Samples cover the hard cases, including overlap |
| 3. Prove on a pilot line | Run vision beside the existing method | Differences explained and within an agreed tolerance |
| 4. Integrate | Send counts to the MES, WMS or alert channel | Mismatches reach a named owner |
| 5. Operate | Monitor drift, retrain on new products, patch devices | Review cadence and rollback in place |
| 6. Scale | Repeat the pattern at more lines and sites | Same controls at each site |
What will change in AI object counting over the next 3 to 5 years?
The table separates sourced facts from our own view. Timings marked as our view are judgements, not forecasts from the sources.
| Change | What the source says or our view | Source or basis | What to do now |
|---|---|---|---|
| Edge budgets keep growing | Global edge computing spending is expected to reach about $380 billion by 2028 from nearly $261 billion in 2025 (13.8% CAGR); retail and services and manufacturing are the largest sectors | IDC, 17 March 2025 | Plan counting as part of a shared edge platform, not a stand-alone camera project |
| Vision replaces scan-based cycle counts | Gartner predicts half of companies with warehouse operations will use AI-enabled vision systems by 2027, replacing scanning-based cycle counting; 20% of 506 respondents had adopted them in a December 2023 survey | Gartner, 12 June 2024 | Pilot pallet and bin counts where cycle counting is costly |
| EU AI Act dates move to 2027 and 2028 | High-risk duties under Annex III apply from 2 December 2027 and under Annex I from 2 August 2028 after the AI Omnibus (in force 27 July 2026); check whether your counting use falls in either category | European Commission AI Act page, last updated 19 October 2026 | Map each counting use, especially where people are in view, and take legal advice |
| Counting tools become standard components | Tracking-based counters with line and region counting are already packaged in open tooling, so build effort shifts to data, tuning and operations | Ultralytics object counting guide (current tooling); timing is our view, 2026 to 2029 | Spend effort on training data and monitoring, not on writing the counter |
| Counts feed governed agent actions | Counts will increasingly trigger reorders, holds and alerts through agents, which makes policy and audit trails part of the design | Our view, 2027 to 2030 | Define which counts may trigger action and which need a person |
What would prove us wrong: if sites keep counting at a fixed point with simple sensors and see no gain from vision, the case for the extra tuning effort weakens. Check this on your own pilot before scaling.
When is vision-based counting the wrong choice?
| Situation | Better choice | Reason |
|---|---|---|
| Identical items at a fixed point, stable format | Mechanical or optical sensor | Simpler and cheaper to maintain |
| Every item already carries a readable label | Barcode or RFID | Gives item identity, not only a count |
| Heavy occlusion that cameras cannot resolve | Re-design presentation or use weight-based checks | Counts will stay unreliable |
| No owner for exceptions or model upkeep | Fix ownership first | Counts will drift without monitoring |
To map one counting decision your agents should make, and the context and policy it depends on, book a Context Workshop. See what happens in the workshop. The platform behind it, ElixirData, keeps governed context, versioned policy and decision traces in one decision layer above AI agents.
What should you plan for in 2027?
- 2 December 2027: the European Commission states that high risk rules for use cases in sensitive areas, such as biometrics, now apply from this date after the AI Omnibus. 2 August 2028 is the extended date for high risk systems in regulated products. See the Commission AI Act page. Map each counting use, especially where people are in view.
- By 2027: Gartner predicts that 50% of companies with warehouse operations will use AI enabled vision systems, replacing scan based cycle counting. Read the Gartner release.
- Pilot one pallet or pack count now, so the controls are tested before volumes grow.
See agentic video intelligence on your own cameras. XenonStack Vision AI agents search, summarise and investigate video, then act within the decision boundaries you set. Explore xenonstack.ai
Part of our guide: What Is Agentic Video Intelligence?.
FAQ
How does AI object counting avoid counting the same item twice?
According to the Ultralytics object counting guide, a tracker follows each object across frames so the same object is not counted repeatedly, and a counter tallies items crossing a line or entering a region.
Why run object counting at the edge?
Processing near the camera gives a live count on the line, sends less video to the cloud and keeps counting if the site link drops. Edge devices still need patching, access control and monitoring.
Is vision always better than sensors or barcodes?
No. Fixed sensors suit identical items at one point and barcodes or RFID suit individually labelled goods. Vision fits mixed or overlapping items and cycle counts where scanning is slow.
What does Gartner say about vision in warehouses?
Gartner predicts that by 2027 half of companies with warehouse operations will use AI-enabled vision systems, replacing scanning-based cycle counting. Its December 2023 survey of 506 supply chain professionals found 20% had adopted them.
When do EU AI Act high-risk duties apply?
According to the European Commission, high-risk duties under Annex III apply from 2 December 2027 and under Annex I from 2 August 2028 after the AI Omnibus. Check whether a counting use falls in either category.
What should be governed in a counting system?
Model and rule versions, test results on real images, device security, image retention and an owner for every mismatch that triggers an action.
Next Steps in Implementing AI Vision and Edge Computing
Talk to our experts about implementing AI vision and edge computing systems. How industries and departments use object counting and decision intelligence to become efficiency-centric. Utilize AI to automate and optimize manufacturing operations, improving accuracy and responsiveness.
Follow XenonStack on LinkedIn: XenonStack on LinkedIn for new guides on agentic AI, data and platform engineering.
Explore the XenonStack platform family: ElixirData · ElixirClaw · ElixirHub · NexaStack · MetaSecure · Neural AI · AgentGRC · AgentSRE · AgentAnalyst · AgentInstruct · AgentRAI · AgentScrum · AgentSearch · AgentForce · AI Aviator · SAIF Aviator · CohortIQ · XenonStack AI · XenonStack UAE