A Framework for Deep Quantification Learning