I would go by weight personally. Timing it requires you to have consistent pressure which is hard to do especially if you have a high volume day. This works best if you supply the containers to eliminate complexity of zeroing a scale, or the error of having differently weighted containers. You'll need a platform that sends a varying electrical signal based on load, you could rig a potentiometer to change resistance based on the position of the platform, as the springs compress and the platform sinks the resistance decreases, now run a voltage through this potentiometer and a couple of resistors to get a variable voltage then run this into an op amp that turns on and off a relay that controls a servo that opens and closes a valve. Adjust the resistances until you get it switching off when you want it to. I suggest ball parking it based on the weight of a gallon of water+container, then adjusting it up since there will be a small amount of momentum from the water falling from the faucet. Setting up the Op Amp circuit isn't too tough I suggest getting a text book on them. I suggest http://www.amazon.com/gp/product/0130149918/ref=pd_sxp_grid_i_2_2/002-1800445-2936816?%5Fencoding=UTF8
It's accessible to someone with little background in electronics, and is loaded with example circuits that you can virtually copy out of the book for any application. It is also very robust considering it's simplicity.
As far as making it coin operated, use a locking mechanism that uses coins as it's key, then have that activate the power supply running to the op amp circuitry, and valve control, add another op amp circuit that turns off the power after the valve is closed.
If you're dead set on a timer, use the coin locking mechanism, but have it turn a dial timer, when the timer goes off it sends an electrical signal to an op amp that activates a relay and turns off the valve.