For trees recording derivations in context-free grammars, there are exactly as many substitution operations as nonterminals on the right-hand side of the rule used.
child order in the derivation tree can be used to record the identity of the substitution node.