DFS
```javascript []
/**
 * @param {number[]} parents
 * @return {number}
 */
const countHighestScoreNodes = function (parents) {
  const tree = Array.from({ length: parents.length }, () => []);

  for (let i = 1; i < parents.length; i++) {
    tree[parents[i]].push(i);
  }

  let maxScore = 0, count = 0;

  const dfs = (node) => {
    let size = 1, product = 1;
    const total = parents.length - 1;

    for (const child of tree[node]) {
      const childSize = dfs(child);
      size += childSize;
      product *= childSize;
    }

    const score = node === 0 ? product : product * (total - size + 1);
    if (score > maxScore) {
      maxScore = score;
      count = 1;
    } else if (score === maxScore) {
      count++;
    }
    return size;
  };

  dfs(0);
  return count;
};
```
['Array', 'Tree', 'Depth-First Search', 'Binary Tree', 'JavaScript']