Milk meter for measuring a flow rate of a milk flow, provided with an inlet, an outlet, and a liquid flow path from the inlet to the outlet. The milk meter has a measuring chamber and a float in the measuring chamber configured to float on milk. The milk meter determines the flow rate from the level of milk and the milk meter is provided with a magnetic unit for generating a magnetic field and the magnetic field varies in height direction of the measuring chamber, and the float has an electronic measuring unit for measuring the strength of the magnetic field. The measured strength of the magnetic field is a measure of the height at which the float is floating on the milk and the measured strength of the magnetic field is a measure of the flow rate of the milk flow.