A quantitative Doignon-Bell-Scarf theorem