How is the flow rate of the measured medium calculated in an electromagnetic flow meter?