Enumerable#count Show archive.org snapshot can do three things.
Enumerable#count
ary = [1, 2, 4, 2] ary.count #=> 4 ary.count(2) #=> 2 ary.count { |x| x % 2 == 0 } #=> 3
Check out our e-book. Learn to structure large Ruby on Rails codebases with the tools you already know and love.