A dose setting element for an injection device, comprising a first part being adapted to rotate during setting of a dose, and a second part being adapted to engage with the first part. Each time the first part has been rotated through a first specific angle the second part is caused to rotate through a second specific angle being smaller than the first specific angle. Keeps track of the total dose set since a cartridge was inserted. When the second part has been rotated a predefined number of times is abuts a stop, thereby preventing further dose setting. Prevents setting of a dose beyond an amount remaining in the cartridge. It is not necessary that part of the limiting mechanism travels a distance corresponding to the total dose due to the two separate parts. This allows the dose setting element and injection device to be small as compared to prior art dose limiting mechanisms. Further, an injection device comprising the dose setting element. Suitable for self-injection, e.g. of insulin.