Solution for NumberLetterCounts with explanation