A nebulizer is proposed which comprises an insertable container and a counter device for counting operations of the nebulizer. The nebulizer can be opened for replacing the container. The counter devices blocks opening of the nebulizer until a predetermined number for operations has been reached.