Improve the logic for calculating popular file types by grouping and summing counts based on friendly type names for better clarity and performance.