add a default value of zero for setting count and flipped logic for if badge is present