Statistics is always calculated for the whole file, unless the selection is present in the current editor window. If selection is present, statistics calculation is limited to this selection. Multiple selections are fully supported.