Counting Methods: Techniques and Applications
- Counting methods are systematic procedures that quantify occurrences using direct enumeration, inferential techniques, and algebraic tools across varied domains.
- They include approaches such as generating functions, inclusion–exclusion, recursive decomposition, and double counting to derive exact counts or estimates.
- Applications range from bibliometric credit allocation and subgraph enumeration to sensor data analysis and learning-based visual counting, addressing complex counting challenges.
Counting method denotes a procedure for determining multiplicities, frequencies, or cardinalities in a specified representation. In contemporary research, the term is markedly polysemous: it refers to exact subgraph enumeration in networks, credit allocation rules in bibliometrics, visitor and object enumeration from sensors and images, frequency-moment estimation in data streams, counting statistics in stochastic processes, exact model counting in propositional logic, and asymptotic enumeration in arithmetic statistics (Sevim et al., 2020, Gauffriau, 2020, Gazis et al., 2022, Ohkubo et al., 2010, Birnbaum et al., 2011, Alberts et al., 30 Jan 2025). Across these settings, the main methodological axis is the choice between direct enumeration and indirect inference through decomposition, inclusion–exclusion, generating functions, sampling, or learned surrogates.
1. Domain-dependent meanings and bibliometric validation
In bibliometrics, a counting method is not primarily an algorithm for enumeration but a rule for assigning credit to contributors. The survey literature identified 29 original counting methods introduced between 1970 and 2018, with 17 introduced in 2010–2018 alone; 21 of the 29 counting methods are rank-dependent and fractionalized, meaning that authors share 1 credit but do not receive equal shares (Gauffriau, 2020). This immediately distinguishes bibliometric usage from graph, logic, or image-analysis usage, where the counted object is usually an occurrence or configuration rather than a share of scholarly output.
The standard bibliometric taxonomy includes full counting, in which each author receives 1 full credit, fractional counting, in which a publication’s credit is divided equally among co-authors, and rank-dependent fractional counting, in which allocation depends on author order. A canonical example is harmonic counting, where the -th author of a paper with authors receives
The survey argues that the common opposition between full and fractional counting is too simple, because methods also differ in homogeneity, parameterization, and intended purpose (Gauffriau, 2020).
Validation is treated explicitly. Internal validation is organized around adequacy, sensitivity, and homogeneity, following Gingras’ framework for bibliometric indicators. External validation asks whether the intentions in the studies that introduced the counting methods comply with their subsequent use. The reported outcome is a mismatch in many cases between intended properties and actual applications, together with a lack of standardization in how counting rules are justified and reported (Gauffriau, 2020). This suggests that, even where counting is mathematically elementary, method choice remains an interpretive and evaluative decision.
2. Double counting, inclusion–exclusion, and explicit counting functions
A classical meaning of counting method is the computation of the same quantity in two different but equivalent ways. The two-sided counting method, also called two-sided addition or counting in two ways, evaluates a quantity by two alternative descriptions,
and uses the equality to derive an identity or formula (Máder et al., 2022). In the literature summarized here, this method appears in algebra, number theory, combinatorics, analysis, geometry, and probability. Representative identities include
and
The method is presented not only as proof technique but as a unifying viewpoint connecting discrete and continuous settings (Máder et al., 2022).
A related explicit formalism is the counting function , defined using insets. Let 0, with 1 main blocks 2 of sizes 3 and an additional block 4 with 5 elements. An 6-inset is an 7-subset intersecting every main block, and 8 denotes the number of such insets. When all 9, the function reduces to the binomial coefficient: 0 Its inclusion–exclusion formula is
1
and for equal block size 2,
3
The paper uses this function to count 4-matrices with prescribed constraints, Delannoy numbers, Catalan numbers, spanning subgraphs of complete bipartite graphs, certain compositions, lattice paths, and chess moves, emphasizing that different configurations may be counted by the same method (Janjic et al., 2013).
These two strands—two-sided counting and inset-based inclusion–exclusion—show a common structural theme: exact counting often proceeds by replacing direct enumeration with an equivalent representation whose algebraic or geometric symmetry exposes the count.
3. Structural decomposition on graphs and related discrete objects
In graph algorithms, counting methods frequently exploit separators, cut-sets, or smaller counted motifs. Sevim, Güvel, and Özkahya study exact counting of 6-motifs with low connectivity, namely motifs containing a cut-vertex or cut-edge, and generalize the exact algorithm of Pinar, Seshadhri, and Vishal from the ESCAPE framework to selected 6-node motifs (Sevim et al., 2020). The central idea is to express counts of 6-motifs in terms of counts of smaller motifs rather than enumerate all 6-node subgraphs directly. For a 6-node star, the formula is
5
and the paper also gives cut-edge formulas such as
6
The stated aim is to circumvent the combinatorial explosion that naturally arises when counting subgraphs in large networks (Sevim et al., 2020).
A different decomposition strategy appears in the Divide, Measure and Conquer method for counting independent sets. The method combines Divide and Conquer, using separators or bisections, with Measure and Conquer, using a refined progress measure rather than raw instance size. The resulting algorithm counts all independent sets in time 7 for subcubic graphs and 8 for general graphs, using polynomial space (Junosza-Szaniawski et al., 2015). The same paper notes an application to graph coloring: plugging the independent-set counter into the algorithm of Björklund, Husfeldt and Koivisto yields 9-time coloring in polynomial space (Junosza-Szaniawski et al., 2015).
Structural decomposition also governs recent work on permutation patterns. The use of multiset decision diagrams (MZDDs) extends set-based decision diagrams to multisets, where multiplicity records the number of occurrences of a specified pattern in each permutation. In that framework, the multiplicity of a permutation in the constructed multiset is precisely its pattern-occurrence count, enabling computation of the full distribution 0 for a given pattern (Conway et al., 2023). This suggests a broader principle: the count of a complex object is often best recovered from counts attached to a structured intermediate representation.
4. Sampling, streaming, and rare-event estimators
Approximate counting becomes unavoidable when exact enumeration is either memory-bounded or exponentially expensive. In massive graph streams, Tiered Sampling addresses approximate counting of sparse motifs such as 4- and 5-cliques in a single pass with a fixed memory budget 1. The memory is partitioned into tiers of reservoir samples: a base layer of edges and higher layers of substructures such as triangles or 4-cliques. The estimator is unbiased, with
2
and the method is reported to significantly outperform single edge sample approaches for sparse motifs (Stefani et al., 2017).
In data-stream theory, Compressed Counting (CC) estimates the 3-th frequency moment
4
for 5 in the Turnstile model, under the restriction that 6 at evaluation time. CC uses skewed stable random projections and achieves sample complexity 7 rather than 8 when 9 with small 0 (0802.2305). The method is proposed as a building block for entropy estimation, method-of-moments parameter estimation, and logarithmic norms and distances in heavy-tailed settings (0802.2305).
Rare-event methodology supplies another major family of counting methods. The splitting method introduces nested sets
1
and rewrites the count as
2
A later enhancement combines splitting with capture-recapture, using overlaps between sampled solutions to reduce estimator variance; experiments reported superiority for SAT counting in variance and speed (Dupuis et al., 2011).
Monte Carlo counting is also applied to the 3-Queens problem. Recent work describes vertical likelihood Monte Carlo, importance sampling, slice sampling, simulated annealing, energy-level sampling, nested-sampling, and a quantile re-ordering based on the Lorenz curve of a sum related to the number of solutions (Polson et al., 2024). The paper states that this approach leads to an efficient polynomial-time solution and that the Monte Carlo approach counts the number of solutions in polynomial time (Polson et al., 2024). A plausible implication is that rare-event perspectives continue to blur the boundary between approximate counting, statistical physics, and combinatorial enumeration.
5. Generating functions, recursive procedures, and inductive frameworks
A direct numerical counting method can be based on a generating function rather than stochastic simulation. For finite-state Markov processes, the generating function
4
encodes the number of occurrences of a specified transition, and arbitrary moments can in principle be obtained by solving coupled differential equations numerically. The 5-th moment is
6
where 7 is the global generating function (Ohkubo et al., 2010). The method is presented as applicable to any stochastic process with a finite state space (Ohkubo et al., 2010).
In logic, the CDP algorithm adapts the Davis–Putnam procedure to exact model counting for propositional CNF or DNF formulas. For a formula 8 with 9 clauses and 0 variables, and literal-occurrence probability 1, the abstract reports average running time
2
with exact counts obtained by recursively splitting and summing model counts from the subproblems (Birnbaum et al., 2011).
Arithmetic statistics supplies a different inductive paradigm. A recent method for counting number-field extensions by discriminant fixes a permutation group 3, chooses a normal subgroup 4, and decomposes 5-extensions through the tower 6 with 7 and 8. The framework relies on asymptotic counts for 9-extensions, uniform bounds for the number of such 0-extensions, and possibly weak bounds on the asymptotic number of 1-extensions; it does not require that most 2-extensions of a 3-extension are 4-extensions (Alberts et al., 30 Jan 2025). The paper uses this inductive method to prove new cases of Malle’s Conjecture and counterexamples to it (Alberts et al., 30 Jan 2025).
Across these examples, the counted quantity is rarely accessed directly. Instead, it is encoded in a generating function, a recursive proof system, or a fiber decomposition over a quotient structure.
6. Sensor, image, and detector counting
In sensing applications, counting methods typically convert noisy measurements into occupancy or event estimates. An RFID-based visitor-counting system assigns passive High-Frequency (HF) RFID tags to visitors, places readers at room entrances, and uses Raspberry Pi devices and a Django backend to aggregate data. If 5 is the set of tags registered by room 6’s reader, then
7
The method is intended for counting, tracking, and monitoring visitors inside a building in real time (Gazis et al., 2022).
A different image-based method counts similarly sized and mostly round objects without segmenting every object individually. After binarization, it builds a histogram of lengths of continuous white-pixel intervals. For an estimated object diameter 8, the area of an average object is
9
and the total count is
0
where 1 is the number of white pixels in the binary image (Glagolevs et al., 2018). The paper evaluates the method on human bone cells, oranges, and pills, with all reported average counting errors below 2 on the four datasets listed in the summary (Glagolevs et al., 2018).
For direct electron detectors, Back-Propagation Counting (BPC) treats electron counting as a deconvolution problem with a physically motivated kernel. A single-electron response is modeled by
3
the reconstructed frame is
4
and the loss is
5
Optimization updates the count grid by back-propagation, followed by rounding and an occupancy prior based on Poisson statistics (Renner et al., 6 Nov 2025). The paper reports robustness to increasing occupancy and improved diffraction peak intensity and image contrast relative to a standard counting method, especially in high-fluence settings such as in situ TEM movies and diffraction (Renner et al., 6 Nov 2025).
7. Learning-based visual counting and class-agnostic formulations
Modern computer-vision counting methods frequently recast counting as density estimation, matching, or recursive subdivision. S-DCNet starts from the observation that visual counting is an open-set problem, whereas the available training counts form only a small closed set. It discretizes counts into intervals and uses spatial divide-and-conquer on feature maps: 6 By recursively dividing dense regions until local counts fall into the observed range, the method is reported to generalize to open-set scenarios and to achieve state-of-the-art results on ShanghaiTech, UCF_CC_50, UCF-QNRF, TRANCOS, and MTC (Xiong et al., 2019).
A different line of work formulates counting as matching repeated instances. The Generic Matching Network (GMN) of Lu, Xie, and Zisserman embeds an exemplar patch 7 and an image 8 as
9
forms a dense matching representation, and predicts a similarity map
0
Counting can then be done either by local maxima or by integrating the similarity map (Lu et al., 2018). The paper emphasizes class-agnostic counting, training from video data labeled for tracking, and few-shot specialization via residual adapters (Lu et al., 2018).
Density-based counting has also been extended by reusing point annotations beyond Gaussian density-map generation. Focus for Free in Density-Based Counting introduces a counting-specific augmentation that simulates occluded objects by copying annotated object regions, and a foreground distillation method that trains an auxiliary network on images with blacked-out backgrounds using foreground masks derived from the annotations (Shi et al., 2023). The composite loss may include density regression, local segmentation focus, and global density classification: 1 The reported effect is stronger robustness under occlusion, background clutter, and varying crowd densities (Shi et al., 2023).
The most radical generalization is ABC123, an exemplar-free, multi-class, class-agnostic counting method. It outputs a fixed number of density maps, matches predictions to ground-truth classes with a cost
2
and trains with
3
The count for a predicted map is obtained by integration,
4
The paper introduces the MCAC dataset and reports that ABC123 outperforms contemporary methods on MCAC without human-in-the-loop annotations, while also transferring to FSC-147 (Hobley et al., 2023).
Taken together, these methods show that the current meaning of counting method in vision is no longer confined to regression from global image statistics. It now includes open-set decomposition, self-similarity matching, auxiliary supervision from point annotations, and blind multi-class density prediction.