Building record count profiling scripts