Only calculate countsByRank once