fn summarize(results: &[DiagnosticResult]) -> DiagnosticsSummary
Counts results by level and by type.