Measuring flow rate of a milking machine

My process actually has very similar problems since it's moving fluids containing biologic materials. That's exactly the reason I chose a weight sensor -- the nasties cause problems with paddlewheel flow sensors!
My fluid aspiration is also done by vacuum: to avoid contamination, I pull a vacuum on a sealed container (that is weighed to verify flow) and that vacuum pulls the fluid in through another tube.

Using a flow sensor has the issues you mention, although in my case I was mainly concerned with clogs.The point of suggesting weight as a mechanism is that it can be completely decoupled from the fluid path and the sanitary issues don't apply.

He could either (a) weigh the final container that the milk is going to be in, or (b) transfer it to an intermediate container that is weighed, then have another pump system to transfer it out.

@OP:
If the only issue you have with the flowmeter is that air is also being measured, you could add a pressure sensor on the line. That should allow you to see the difference between milk & air and you can ignore the counts when milk is not flowing.