An identification arrangement identifies animals, and only when a milk permission criteria is fulfilled is that animal provided with access to the milking machine. The milking machine extracts milk from the animal. In connection with the milking, a cell counter unit determines a quality parameter reflecting a somatic cell count for the milk extracted from the animal. The cell counter unit includes a sampling unit for taking samples from the extracted milk and a counter unit, which determines the quality parameter by registering a true number of somatic cells per unit volume in said samples. A control unit receives the quality parameter and in response thereto assigns a milk permission interval determining an earliest point after a completed milking at which point the set of milk permission criteria for the animal are again enabled to be fulfilled.