Hello;
I think it would be better to find this line, in index.php:
$num_new_images = $config['image_cells'];
and if you want to have 6 images in two rows of three images, replace it by:
$num_new_images = 6; // number of total images displayed
$config['image_cells'] = 3; // number of images per row