Added a new variable for total csv row count to avoid multiple
hardcoding elsewhere.
Criteria Performance support improvements

Several changes to implement criteria performance reports including
tests.