In Binary tree,
It is easy by just observing, But for n-ary tree try to apply this logic,
1 Internal node = n children
2 internal nodes = n - 1 children + n children [why this, because out of above n leaves we are making one non leaf, then again n children for that non leaf]
3 internal nodes = (2n -1) -1 + n = 3n -2 children
So pattern is
X non leaves = Xn - (X-1) leafs
now in our case Xn - (X-1) = 150
Hence X = 149.
In binary tree it is easy to solve by observing 2-3 small trees, leaf - 1= internal. But hope this helps for complex trees. :)