How a ream of paper is determined?

A ream is a fixed unit of measure, currently set at 500 sheets of paper. At one time it was 480. A printer's ream is 516 sheets.