Update the badge count when toggling status