What exactly does "quantity" in inventory changes mean?

Thank you! is there any documentation on how exactly inventory count is computed, based off these states (I couldn’t find it)? below are a few state changes, and my inference on whether they increment or decrement:

  [-] RESERVED_FOR_SALE-SOLD
  [-] SOLD-NONE
  [-] IN_STOCK-SOLD
  [+] SOLD-RETURNED_BY_CUSTOMER
  [+] RESERVED_FOR_SALE-IN_STOCK
  [-] RETURNED_BY_CUSTOMER-NONE

  [-] IN_STOCK-RESERVED_FOR_SALE
  [+] ORDERED_FROM_VENDOR-IN_STOCK
  [-] ORDERED_FROM_VENDOR-WASTE
  [+] SOLD-IN_STOCK
  [+] NONE-ORDERED_FROM_VENDOR
  [+] NONE-IN_STOCK
  [+] RETURNED_BY_CUSTOMER-IN_STOCK
  [-] ORDERED_FROM_VENDOR-NONE
  [-] IN_STOCK-WASTE
  [-] IN_STOCK-NONE