Rank Frequent Error Codes
Count error-code strings with collections.Counter or equivalent counting. Return up to limit [code, count] pairs ordered by descending count, then alphabetically by code when counts tie. Empty input or a non-positive integer limit returns []. Codes are case-sensitive.
Difficulty: intermediate
Examples
[["E2","E1","E2","E3","E1","E2"],2][["E2",3],["E1",2]]