moved to LightboxHelper::getTotalImages().