Remove unused variable task_count