Change number of products per row

The category page shows four products per row by default. This can be changed using the function below (for example, changing it to 2).