def count(direction)
      i = 0
      node = self
      while (node != nil)
        node = node.send(direction)
        i += 1
      end
      i
    end
def count(direction)
      i = 0
      node = self
      while (node != nil)
        node = node.send(direction)
        i += 1
      end
      i
    end
Count the number of nodes in the given direction (:up,:down,:left,:right) until
 the edge of the tree.