bugfix: update counter now triggers record_stats on last update.