4 watts is the POWER of the bulb, which is the amount of energy per unit of time, in this case joules per second. To calculate amount of energy consumed (or radiated) by the bulb, you should multiply the power in watts by the time in seconds. Notice that 1 watt multiplied by 1 second is 1 joule.