Simple Java solution with Approach and Proper comments 
IntuitionWe need to build the Tree and as mentioned in the problem remove each Node and see how many subtrees remnaining key point in this problem is how to fin
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
We need to build the Tree and as mentioned in the problem remove each Node and see how many subtrees remnaining key point in this problem is how to find the parent level nodes 

       ```
           5

        4.        3

 
             1.       2

```

so in above when we remove 3 , we have 1 , 2 and 5-->4 so parent level nodes  are Total(5) -( Left(1) + right(2) + 1(node itself)) = 2.

# Approach
Below code has been implemented using the same steps with comments . 

# Complexity
- Time complexity:
O(N)

- Space complexity:
O(N)

# Code
```java []
class Solution {
    public int countHighestScoreNodes(int[] parents) {
        int totalNodes = parents.length;
        // STEP-1 Build the Tree 
        TreeNode[] tree = new TreeNode[totalNodes];

        // STEP-2 Make sure that all Nodes are created in this array 
        for(int i=0; i<totalNodes; i++){
            tree[i] = new TreeNode();
        }

        // STEP-3 Build the actual Tree , start with node 1 , since node 0 do not have parent
        for(int node=1; node< totalNodes; node++) {
            // This is the root Or Parent
            TreeNode root = tree[parents[node]];
            if(root.left == null){
                root.left = tree[node];
            }else if(root.right == null){
                root.right = tree[node];
            }
        }

        // STEP-4 Capture the count of nodes at each subtree level 
        countNodes(tree[0]);

        // STEP-5 Caculate the maxScore 
        return maxScore(tree);
    }

    private int countNodes(TreeNode root){
        if(root == null){
            return 0;
        }
        root.count = 1 + countNodes(root.left) + countNodes(root.right);
        return root.count;
    }

    private int maxScore(TreeNode[] tree){
        int totalNodes = tree.length;
        long maxScore = 0;
        int count =0;
        for(int node =0; node <tree.length; node++){
            TreeNode root = tree[node];
            int leftTreeNodes = root.left == null ? 0 : root.left.count;
            int rightTreeNode = root.right == null ? 0 : root.right.count;
            int parentNodes = totalNodes - (leftTreeNodes + rightTreeNode +1);
            long product =1;
            if(leftTreeNodes > 0){
                product*=leftTreeNodes;
            }
            if(rightTreeNode > 0){
                product*=rightTreeNode;
            }
            if(parentNodes > 0){
                product*=parentNodes;
            }
            long currentScore = product;
            if(currentScore > maxScore){
                // Reset count to 1
                maxScore = currentScore; 
                count=1;
            }else if(currentScore == maxScore){
                count++;
            }

        }

        return count;

    }
}

class TreeNode {
    TreeNode left ;
    TreeNode right;
    int count;
}
```
['Java']