Update product-image.php

Fix to correctly calculate $attachment_count