Please solve the programming task below using a self-contained code snippet in a markdown code block.

Given the root of a binary tree, return the number of nodes where the value of the node is equal to the average of the values in its subtree.
Note:

The average of n elements is the sum of the n elements divided by n and rounded down to the nearest integer.
A subtree of root is a tree consisting of root and all of its descendants.

 
Please complete the following python code precisely:
```python
# Definition for a binary tree node.
# class TreeNode:
#     def __init__(self, val=0, left=None, right=None):
#         self.val = val
#         self.left = left
#         self.right = right
class Solution:
    def averageOfSubtree(self, root: reeNode) -> int:
        
```