What kind of sensor should I use?

Know how much you put in, know how much you took out, and you know how much is left.

Or put a scale under it. Probably the most absolute way of knowing how much is in it, and how much you actually dispense.