How to know number of component for a particular project

Im working on a report and i would like to show.

For a projec A, how many componets with the Name X and Label Y i have.

Im using Projec Dimension as a ROW, and Label Dimension as a column rigth side to mesure.

My problem is , im not able to get the correct number of componentes for the project that a current have displey