goodNodes = function(root, max = -Infinity, total = [ 0 ]) {
    count(root, max, total);

    return total[0]
}
https://leetcode.com/problems/count-good-nodes-in-binary-tree/
Time O(N) | Space O(H)
@param {TreeNode} root
@return {number}