Quantity/Stock counter

I’d love to have my stock reflect purchases. Is there any way to add code or integration on CF or Shopify to enable my funnel to show when a size is sold out? Or for my OTO to not be shown once they are sold out? Do they have a stock counter?