Determine the number of tiles in a spritesheet based on the image