title: getting the number of nodes in a binary search tree
body: <p>So I'm working on a method that gets the number of nodes in a binary search tree, when I have 3 nodes, it gives me 3, but if I do 5 it gives me 4, what do I need to change?</p>
  
  <pre><code>int BinaryTree::size(int count, Node *leaf) const
  {
      if(leaf != NULL)//if we are not at a leaf
      {
          size(count + 1, leaf-&gt;getLeft());//recurisvly call the function and increment the count
          size(count + 1, leaf-&gt;getRight());
      }
      else
      {
          return count;//return the count
      }
  
  }
  </code></pre>