JS | Solution by Amol
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```javascript []\n/**\n * @param {number} n\n * @param {number[][]} pick\n * @return {number}\n */\nvar winningPlayerCount = function (n, pick) {\n    const occ = {};\n    let count = 0;\n    for (i = 0; i < pick.length; i++) {\n        const key1 = pick[i][0];\n        const key2 = pick[i][1];\n\n        if (!occ[key1]) {\n            occ[key1] = {};\n        }\n\n        occ[key1][key2] = (occ[key1][key2] || 0) + 1;\n    }\n\n    for (let el in occ) {\n        for (let color in occ[el]) {\n            if (occ[el][color] > Number(el)) {\n                count++;\n                break;\n            }\n        }\n    }\n\n    return count;\n};\n```
['JavaScript']