In Ruby, #length and #size are synonyms and both do the same thing: they tell you how many elements are in an array or hash. Technically #length is the method and #size is an alias to it. In ActiveRecord, there are several ways to find out how many records are in an association, and there are some subtle differences in how they work. post.comments.count - Determine the number of elements with an S