Here is a script that will count records per table and output the result as a little CSV output.
It is a little quick and dirty and will take ‘some time’ to run if you have large record counts.
Hope it is useful to someone.
let tableCount = base.tables.length;
let totalRecords = 0;
for(let i = tableCount - 1; i >= 0; i--){
let name = base.tables[i].name;
let table = base.getTable(name);
let result = await table.selectRecordsAsync();
totalRecords += result.records.length;
output.text(name + ' , ' + result.records.length);
}
output.text('Total Records in ' + base.name + ', ' + totalRecords);


