To understand the differences between count, size, and length in Ruby, read these articles:
・count、size、lengthの違い(再考) - うんたらかんたらRuby - Rubyist
・Rubyのsize/length/countの違いは? - QA@IT
・【Rails】sizeとcountとlengthについて - ゆっくりブログ
That’s all from the Gemba.