change where wmstats get output dataset number.

This is not a bug but better way to get the information for number of output dataset. If "outputdatasets" is not defined fall back to old way. - don't merge yet.