I am not entirely sure I understand what you are talking about. The values associated with the nodes are completely optional and arbitrary -- they could very well be strings or other objects or even left
undef. The code just tries to count how many nodes the tree has, independently of the values associated with these nodes.