Let’s start with the second part of your question which is about calculating total events (7).
You can follow the below configuration from Program Indicator:
Regarding the first part of your question which is related to calculating the total count of option values in different events, I do not think this is possible from the configuration of the program indicator side.
I think it’s similar to the below issue which was raised before could you please check and confirm if it’s the same issue as what you are experiencing?
To get the total count from the DE with optionset, make sure the optionset is aggregated with positive or zero integer.
The DE in particular should be SUM in aggregation type.
Create a program indicator for event like in the picture below:
In my example, I have a TEI called: Hello, with two events in one stage. In the first event I entered 4, and the last one I entered 5. Now you can se the last column is the program indicator. 4+5 = 9
In TEI: hehi I entered 6 in the first event and 3 in the last one: 3+6 = 9
For the event count, Ayman has described this for you, but if you only want to filter by events that has a particular data element entered, you need to filter by that data element…