class REXML::Elements

def size


d.root.size # => 6 # Three elements plus three text nodes..
d.root.elements.size # => 3 # Three elements.
d = REXML::Document.new 'seanelliottrussell'

Returns the count of \Element children:

size -> integer
:call-seq:
def size
  count = 0
  @element.each {|child| count+=1 if child.kind_of? Element }
  count
end