Update product-image.php

Fix to correctly calculate $attachment_count
Merge pull request #3037 from scarydakis/master

Fix incorrect CSS class being output in product image gallery