A system and a method for an electronic device for counting objects of similar type in an area includes a register for storing a number of count of the objects in the area; a depth sensor for measuring depth distances between a plurality of points of an object and the depth sensor; a thermal sensor for measuring temperatures of the points of the object; wherein the distances and the temperatures are used to derive spatial thermal information of the object for determining an increase in the number stored in the register.