Changed #configArray to the new getTableCount function