If you’re looking to see how many of a product post sold, there is a new mod to do so.
@post(id).sold()
If you’re looking to calculate how much stock is remaining, then you can use the native stire math to do so. Something like:
@site().math(@post(product.product_type.simple.stock.quantity)-@post(id).sold())
Your product_type.simple.stock.quantity may differ from site to site.