Added incremental counting of records, saves a lot of time when rendering the control pannel