title: Function like array.length that doesn't include NULL elements?
body: <pre><code>TreeNode[] children = grid[row][col].getChildren();
  </code></pre>
  
  <p>I would like a simple function that can tell me how many objects are in this array? <code>getChildren()</code> will return an object of size no larger than 4, for example:</p>
  
  <pre><code>children[0] = null;
  children[1] = TreeNode Object
  children[2] = null;
  children[3] = null;
  </code></pre>