Viscosity-compensated plastic flowmeter and switch for liquids