In the setting of moduli spaces of vector bundles/quiver representations etc I've encountered a few times situations like the one that I'll try to explain thereafter .I was wondering if there's a "deep" common explanation. I'll try to take the quiver setting as the main example : I'm sorry if the question is too vague.
In the quiver setting, one starts from a quiver $Q$ and has the Kac's polynomial $a_{Q,\alpha}$ s.t $a_{Q,\alpha}(q^r) $ equals the number of absolutely indecomposable representations of $Q$ over $\mathbb{F}_{q^r}$ with dimension vector $\alpha$.
In nice situations,(i.e $\alpha$ is indivisble) this polynomial turns out to be also the Poincare polynomial of a generic (Nakajima) quiver variety $\mathfrak{M}(\alpha)$. This is roughly obtained as a symplectic reduction from the space of representations $R(\overline{Q},\alpha)$ of a quiver $\overline{Q}$ s.t $R(\overline{Q},\alpha)=T^*R(Q,\alpha)$.
As $\mathfrak{M}(\alpha)$ is pure and with just even cohomology, the Poincare polynomial is also the number of points $\mathfrak{M}(\alpha)(\mathbb{F}_{q})$.
Somehow counting indecomposable objects for $Q$ turns out then to be linked to rational points of the moduli space for a " cotangent problem".
The same thing more or less happens in the setting of vector bundles over a Riemann surface $\Sigma$. Counting absolutely indecomposable vector bundles of rank $n$ and degree $d$ over a reduction $\Sigma_{q}$ of $\Sigma$ over $\mathbb{F}_q$ gives us the rational points of the moduli space of Higgs fields over $\Sigma_q$(at least for coprime $n,d$). The Higgs field moduli stack $\mathcal{M}^{n,d}_{Dol}$ is the cotangent stack to that of vector bundles $\mathcal{N}_{n,d}$(I don't think I'm using the standard or correct notation).
As this is pure too, one can still relate this to the Poincare polynomial of the moduli space of Higgs field over $\Sigma$.
While I can get (more or less ) the combinatorics behind the proof for these facts, I was wondering whether there's a somehow general or geometric explanation for the appearance of somehow the cotangent moduli stack in the count of indecomposable objects.