I have a perfect binary tree where all leafs are at the same level and all nodes have 2 children.

Now, for a given index in the tree, how can I tell the number of leafs at that node?

I have for each node:
postorderindex
normal order index (left-right, 0 is root)