Improved (and moved) ar_count onchange callback