Metered dose inhaler for dispensing aerosol doses comprising: - an actuator housing with a front side and a rear side opposite the front side, a first open end sized and arranged to receive an aerosol container with an activation valve at a valve end of the container, the container being configured to move in a longitudinal direction from a rest position to an activation position in which the valve is depressed against a bottom portion of the actuator housing such that an aerosol dose is released and a second open end through which the released aerosol dose is dispensed, the second open end being positioned on the front side of the actuator housing and sized and arranged to be coupled to the mouth or nasal cavities of a patient, wherein the metered dose inhaler (1, 1') further comprises - a triggering unit having at least a first trigger member thereon, the triggering unit being configured to interact with the container when the container moves in the longitudinal direction from the rest position to the activation position, wherein the triggering unit is fixed to or integrally formed with the actuator housing; - an electronic unit having a substrate with at least a first switch thereon, the first switch being configured to interact with the first trigger member when the container moves from the rest position to the activation position such that the first trigger member triggers the first switch when the container reaches a first longitudinal position during movement of the container from the rest position to the activation position, - a counting circuit which is configured to receive a signal from the first switch indicating at least a first time when the first switch is triggered by the first trigger member, the counting circuit being arranged on the substrate of the electronic unit, wherein the electronic unit is detachable from the actuator housing independently from the triggering unit, wherein the electronic unit is configured to be reusable in combination with another metered dose inhaler (1, 1') and, that the metered dose inhaler (1, 1') comprises a carrier for carrying and fixing the electronic unit wherein the carrier has attachment members for being attached to the actuator housing, characterized in that the carrier comprises a release mechanism configured to release the attachment members upon manual actuation thereby allowing detachment of the carrier together with the electronic unit from the actuator housing. - an actuator housing with a front side and a rear side opposite the front side, a first open end sized and arranged to receive an aerosol container with an activation valve at a valve end of the container, the container being configured to move in a longitudinal direction from a rest position to an activation position in which the valve is depressed against a bottom portion of the actuator housing such that an aerosol dose is released and a second open end through which the released aerosol dose is dispensed, the second open end being positioned on the front side of the actuator housing and sized and arranged to be coupled to the mouth or nasal cavities of a patient, - a triggering unit having at least a first trigger member thereon, the triggering unit being configured to interact with the container when the container moves in the longitudinal direction from the rest position to the activation position, wherein the triggering unit is fixed to or integrally formed with the actuator housing; - an electronic unit having a substrate with at least a first switch thereon, the first switch being configured to interact with the first trigger member when the container moves from the rest position to the activation position such that the first trigger member triggers the first switch when the container reaches a first longitudinal position during movement of the container from the rest position to the activation position, - a counting circuit which is configured to receive a signal from the first switch indicating at least a first time when the first switch is triggered by the first trigger member, the counting circuit being arranged on the substrate of the electronic unit,