Add node cnt

This PR adds the number of nodes to the node's metadata.
Storing the number of nodes of a subtree will effectively speed up some operations.