HPCC-8735 - Avoid seperate call to fetch total # workunits

ws_workunits, called numWorkUnitsFiltered and getWorkUnitsSorted
when requesting workunits. The latter was able to calculate the
total with minor modification and avoid the need for a seperate
pass with numWorkUnitsFiltered

Signed-off-by: Jake Smith <jake.smith@lexisnexis.com>