Most modern electricty meters have a light pulse output. On the example below this pulses 1000 times for every kWh used. That mans it pulses once everytime a watt hour is used.
For information on open source circuit for how to detect this and monitor energy usage with a Raspberry Pi, have a look here
http://mistertee-talks-electronics.blogspot.co.uk/2013/03/using-raspberry-pi-as-energy-monitor.html