Suppose $X$ is a complex algebraic variety that is paved by affines. We take the most general definition, which is that $X$ has a filtration $0=X_0 \subset X_1 \subset \cdots \subset X_n=X$, each $X_i$ a closed subvariety of $X$, such that $X_i\setminus X_{i-1}$ is a disjoint union of a finite number of copies of affine spaces $\mathbb{C}^{d_{ij}}$ (possibly of different dimensions). (See Optimal definition of "paving by affine spaces"? for a discussion of the different possible definitions.)

If you know all the dimensions $d_{ij}$, then you know the ranks of all the Borel-Moore homology groups (aka homology with compact support) of $X$. When $X$ is nonsingular, this gives the ranks of the (ordinary) cohomology groups by Poincare duality, and when $X$ is compact, this gives the ranks of the cohomology groups by the universal coefficient theorem because homology equals Borel-Moore homology.

Is there a way to get the ranks of the singular cohomology groups out of the $d_{ij}$ when $X$ is neither compact nor nonsingular? Is it even true that the total rank of cohomology is the number of "cells"?

I am interested in the case where $X$ is reducible, but you can assume that the affine paving is compatible with the decomposition into irreducible components and that I have the data of which "cells" in the paving belong to which irreducible components (which includes the data of the dimension of each component).