594809 Disclosed is a milking system comprising a milking machine (110) configured to automatically extract milk from a milking animal (A), an identification arrangement (120) configured to identify an animal (A) and provide the animal (A) with access to the milking machine (110) only if a set of milk permission criteria are fulfilled for that animal (A), a cell counter unit (130) configured to determine a quality parameter reflecting a somatic cell concentration for the milk extracted from said animal (A), and a control unit (140). The control unit (140) is configured to receive the quality parameter and in response thereto assign a milk permission interval determining an earliest point in time after a completed milking at which point in time the set of milk permission criteria for the animal (A) are again enabled to be fulfilled. The cell counter unit (130) comprises a sampling means configured to take samples from the extracted milk, and a counter means configured to determine the quality parameter by registering a true number of somatic cells per unit volume in said samples.