Let $\mathcal{X}$ be an algebraic stack of finite type over a (separably closed) field $ k$. Let's say that $\mathcal{X}$ has finite dimension $d \in \mathbb{Z}$. Is it still true that the number of irreducible components of dimension $d$ of $\mathcal{X}$ is the dimension of $H^{2d}_c(\mathcal{X},\bar{\mathbb{Q}}_{\ell})$ as in the case of schemes? (Here I'm referring to the lisse etale cohomology.)

If this is not true in general, does it hold for a suitable class of stacks like the ones of the form $[X/G]$ where $X$ is a $k$ scheme?