moved orphan_count tracking for orphan_list into the model