Count the images.