How many gallons of milk are worth a visit to the barber shop can only be determined in the marketplace, based on prices measured in the unit account. In a developed economy, transactions are normally intermediated with third party IOUs called money . Not all IOUs are money, however. We usually reserve that term for IOUs denominated in a standardized unit of account established by the State. In the U.S. that unit of account is the dollar.
Money is the credit side of a balance sheet relation.
For every dollar of credit there is an equal amount of debt. A dollar bill is an IOU of the Federal Reserve. A bank deposit is an IOU of the bank. A bank loan creates a deposit, i.e. a negotiable IOU for the borrower, in exchange for a non-negotiable IOU for the bank. The term money is sometimes used in reference to high quality debt instruments nearing maturity.