How to cont total test case, testcase fail in RPE
One answer
You can use 2 (internal) variables (say tcCount and tcFailedCount) with default value set to 0. Use a JavaScript Code element to increment tcCount (without any if condition) and tcFailedCount (if result is Failed). You can use or print these variables after looping through the query.
Please refer RPE sample template RTC_WorkItems.dta, where fixed WorkItems and Total WorkItems are printed.