How to count an issue only once with multiple components

I am creating a chart that gives me a total of issues opened, closed and created per month. The issues are pulled based on their components (e.g., A, B, C, D).

The problem I am running into is that if a particular issue has two or more components, it is being counted twice (e.g., MEPBS-1111 contains component A and B).

Is there a way the issue can only be counted once?

I tried also using the Distinct Issue Count-Issues Created count, but that just pulls everything in the chart instead of just the issues that have component A, B, C or D.

Nevermind, I figured out how to do it.

So what was the solution you implemented.
I am in the same boat but cant figure it out.