This is Kiyo Mizu Dera ("Clear Water Temple") in Kyoto.
There are three kinds of water to drink from. They promise long life, financial well-being and success in love. Ggreg accidentally drank from the wrong fountain, thereby dooming himself to an eternity of poverty and chastity.