How does a flow meter measure the flow rate of a liquid?