minor: count trees