Measuring material flow rates