  To every automorphism w of an infinite rooted regular binary tree we
associate a two variable generating function \Phi_w that encodes information on
the orbit structure of w. We prove that this is a rational function if w can be
described by finitely many recursion relations of a particular form. We show
that this condition is satisfied for all elements of the discrete iterated
monodromy group \Gamma associated to a postcritically finite quadratic
polynomial over C. For such \Gamma we also prove that there are only finitely
many possibilities for the denominator of \Phi_w, and we describe a procedure
to determine their lowest common denominator.
