An add-on unit for a handheld container, preferably a medication container, for storing medication objects, e.g. pills, to be dispensed, includes an open channel with dimensions enabling a free passage of an object to leave the container under influence of a gravity force without using a dispensing mechanism. Shaking the medication container while it is held in a slanting upside down position causes that objects are moved to the channel and will fall through the channel to leave the container. A detector detects the object which passes the channel. Electronic circuitry derives and stores information related to one or more detected passages of objects. The add-on unit is provided with an interface for communication with the outside world for outputting the information derived. Preferably the add-on unit has the form of an insert unit which fits in the neck of a standard container.