Change getLength() to count()