Finding the number of trees in a forest at a given time