Stochastic Enumeration Method for Counting Trees