Is there a reason that you can't move the header logic outside of the `each` loop, and thus get rid of the count variable?