Makkos, Chapter 3, Mishnah 7. This mishnah deals with the principle that a person is not liable to lashes unless he received a warning. Every time a person transgresses a prohibition - even if it is the very same prohibition again and again - if he received a warning each and every time, he is liable to lashes for each transgression separately.
The words of the mishnah:
"Nazir shehayah shoseh yayin kol hayom - eino chayav ela achas" - a nazir who took a vow of nezirus, and among the prohibitions of a nazir is that he may not drink wine, and he drinks wine the entire day - he is liable to only one set of lashes. Even though he goes on drinking throughout that day, he received only one warning.
"Amru lo al tishteh al tishteh, vehu shoseh - chayav al kol achas ve'achas" - each time they warned him: do not drink, and he drinks; do not drink, and he drinks - he is liable for each and every warning and for the drinking that followed it, unlike the case in which he received only a single warning.
An exception:
If there is a vessel before the nazir containing a large amount of wine, and the witnesses say to him: "Do not drink from this vessel, because it contains such and such a number of measures" - for example, ten quarter-log measures of wine - "and if you drink, you will be liable to lashes for each and every one," and he drinks the entire vessel, all ten measures - he is liable to lashes for each and every measure, even though he received only a single warning for it.
In summary: liability for lashes is measured according to the warning: continuous drinking all day long with one warning - a single liability; a warning each and every time - liability for each act of drinking; and a single warning that specifies the number of measures in the vessel - liability for each and every measure.