class ActiveRecord::Result

def length

Returns the number of elements in the rows array.
def length
  @rows.length
end