minsum nsum predx
The nsum function returns the number of data points in the statistics matrix, as follows: