Correct ui_count and ui_total_count