The idea is maintain a count variable initialize to 0. Traverse the tree and compare root data with x. If root data is greater than x, increment the count variable and recursively call for all its children.
Number of nodes greater than a given value in n-ary tree: https://www.geeksforgeeks.org/number-nodes-greater-given-value-n-ary-tree/