You could put some items into simple chest, and output redstone signal would be equal to its fill. For example, full chest would emit 15 signal, half filled chest would emit 7-8 signal. They say you could do same-ish with bookcases.
Here is mine setup for controlling Boiler-Turbine system
If...