Change number of thumbnails per row in the product gallery

The product gallery thumbnails have a default setting of 4 per row but this may not work well with your theme. The number of thumbnails per row can be set using this code.