Let ε 1 , … , ε n be independent and identically distributed Rademacher random variables taking values ± 1 with probability 1 / 2 each. Given an integer vector a = ( a 1 , … , a n ) , its concentration probability is the quantity ρ ( a ) : = sup x ∈ Z Pr ( ε 1 a 1 + ⋯ + ε n a n = x ) . The Littlewood–Offord problem asks for bounds on ρ ( a ) under various hypotheses on a, whereas the inverse Littlewood–Offord problem, posed by Tao and Vu, asks for a characterization of all vectors a for which ρ ( a ) is large. In this paper, we study the associated counting problem: How many integer vectors a belonging to a specified set have large ρ ( a ) ? The motivation for our study is that in typical applications, the inverse Littlewood–Offord theorems are only used to obtain such counting estimates. Using a more direct approach, we obtain significantly better bounds for this problem than those obtained using the inverse Littlewood–Offord theorems of Tao and Vu and of Nguyen and Vu. Moreover, we develop a framework for deriving upper bounds on the probability of singularity of random discrete matrices that utilizes our counting result. To illustrate the methods, we present the first ‘exponential-type’ (that is, exp ( − c n c ) for some positive constant c) upper bounds on the singularity probability for the following two models: (i) adjacency matrices of dense signed random regular digraphs, for which the previous best-known bound is O ( n − 1 / 4 ) , due to Cook; and (ii) dense row-regular { 0 , 1 } -matrices, for which the previous best-known bound is O C ( n − C ) for any constant C > 0 , due to Nguyen.