counting of trees