What measures the quantity of matter in an object?

The quantity of matter in an object is its mass. If you then know what the object is made from you can find out (approximately) how many atoms or molecules it has (measured in mol).