Renaming length to imageCount. This fixes #2.