Quantity theory