Fix a bug with count() and quantification.