Counting leaf nodes

Besides some renaming, this commit introduces a property of the Node
class that can tell the caller how many leaf children it has. This is
important to find out how many data a node has to store. It uses a
logical AND on the two bit masks and is doing some bit magic on the
result to find out how many bits are set (=1).