RPE report with statistics
One answer
Yes. You can use javascript/template variables for calculations. You can refer sample template WorkItems.dta (under %rpe_home%\templates\EWM) where _wiFixedCount variable is used for counting fixed work items based on some conditions.
Did you explore using ArchitectureElementStatistics schema provided by AM?
https://[host]:[port]/ccm/reporting/rhapsody/ArchitectureElementStatistics?metadata=schema