Improve/fix tree counting functions