Fix countCols for arrays with column settings.

If you provide a columns setting for an array, the Max function was causing it to always return the size of the array even when you might have fewer cols in your settings.