More reliable way to determine number of test groups

Session scope have not been seen with old-way xml configuration because of number field was not set.