What is an exact measure of sparsity?
&quot;Is there any exact, i.e. numerical, definition for sparsity?&quot; And by numerical, I understand both computable, and practically &quot;usable&quot;. My take is that: not yet, as least, there is no consensus, yet there are some worthy  contenders. The first option &quot;count only non zero terms&quot; is precise, but inefficient (sensitive to numerical approximation and noise, and very complex to optimize). The second option &quot;most elements of a signal are zero or close to zero&quot; is rather imprecise, either on &quot;most&quot; and &quot;close  to&quot;.
So  &quot;an exact measure of sparsity&quot; remains elusive, without more formal aspects.
One recent attempt to define sparsity performed in Hurley and Rickard, 2009 Comparing Measures of Sparsity, IEEE Transactions on Information Theory.
Their idea is to provide a set of axioms that a good sparsity measure ought to fulfill; for instance, a signal $x$ multiplied by a non zero constant,  $\alpha x$, should have the same sparsity. In other terms, a sparsity measure should be $0$-homogeneous. Funnily, the $\ell_1$ proxy in compressive sensing, or in lasso regression is  $1$-homogeneous. This is indeed the case for every norm or quasi-norm $\ell_p$, even if they tend to the (non-robust) count measure  $\ell_0$ as $p\to 0$.
So they detail their six axioms, performed computations, borrowed from wealth analysis:

Robin Hood (take from the rich, give to the poor reduces sparsity),
Scaling (constant multiplication preserves sparsity),
Rising Tide (adding the same non zero account reduces sparsity),
Cloning (duplicating data preserves sparsity),
Bill Gates (One man getting richer increases sparsity),
Babies (adding zero values increases sparsity)

and probe known measures against them, revealing that the Gini index and some norm or quasi-norm ratios could be good candidates (for the latter, some details are provided in Euclid in a Taxicab: Sparse Blind Deconvolution with Smoothed $\ell_1/\ell_2$ Regularization, 2005, IEEE Signal Processing Letters). I sense that this initial work ought to be further developed (stay tune at SPOQ, Smoothed $p$ over $q$ $\ell_p/\ell_q$ quasi-norms/norms ratios). Because for a signal $x$, $0&lt; p\le q$, the norm ratio inequality yields:
$$ 1\le \frac{\ell_p(x)}{\ell_q(x)}\le \ell_0(x)^{1/p-1/q}$$
and tends to $1$ (left-hand side, LHS) when $x$ is sparse, and to the right-hand side (RHS) when not. This work is published in 2020 as SPOQ: smooth ℓp-Over-ℓq Regularization for Sparse Signal Recovery applied to Mass Spectrometry (arxiv preprint, SPOQ published paper, IEEE Transactions on Signal Processing, 2020 and Matlab toolbox).
However, a sound measure of sparsity does not tell you whether the transformed data is sufficiently sparse, or not, for your purpose.
Finally, another concept used in compressive sensing is that of the compressibility of signals, where the re-ordered (descending order) coefficient magnitudes $c_{(k)}$ follow a power law $C_\alpha .(k)^{-\alpha}$, and the bigger the $\alpha$, the sharper the decay.