Means for counting the doses of dispensed liquid