title: Binary Search Tree using recursion in Java
body: <p>I am hoping someone can give me an explanation of how I am supposed to finish these two methods. I am willing to do the work myself and am not trying to be lazy. Having said that, here is the problem:</p>
  
  <p>2 methods: Recursively need to</p>
  
  <ol>
  <li>count the number of nodes in a binary tree,</li>
  <li>count the number of right children</li>
  </ol>
  
  <p>I have already implemented the following code:</p>
  
  <pre><code>public class IntBSTNode
  {
  
      protected int key;
      protected IntBSTNode left, right;
  
      public IntBSTNode()
      {
          left = right =null;
      }
  
      public IntBSTNode(int el)
      {
          this(el, null, null);
      }
  
      public IntBSTNode( int el, IntBSTNode lt, IntBSTNode rt)
      {
          key = el;
          left =lt;
          right = rt;
      }
  }
  </code></pre>