function countErrors(results) {
	let errorCount = 0;
	let fatalErrorCount = 0;
	let warningCount = 0;

	for (const result of results) {
		errorCount += result.errorCount;
		fatalErrorCount += result.fatalErrorCount;
		warningCount += result.warningCount;
	}

	return { errorCount, fatalErrorCount, warningCount };
}
Count error messages.
@param {LintResult[]} results The lint results.
@returns {{errorCount:number;fatalErrorCount:number,warningCount:number}} The number of error messages.