count_nodes in a binary tree