Learning to Quantify