global stats must be computed with the right number of files