Hi guys,
I need a column for the total number of children (Stories) for each Epic in my JIRA structure.
First of all, my structure looks like this:

For information, I added Group by Component/s in automation, so there are groups of Component/s under each Epic and Stories are placed under groups according to its Components.
What formula can I use to calculate the total number of Stories?
What I used to use for Story # before implementing groups of Components was:
IF issuetype = "Epic":
SUM#children{IF issuetype = "story": 1}
But after implementing groups of Components, the formula is not working now.
Any solutions?