Coulomb Counting vs Joule Counting?
If the point is to track what state the battery is in, then it is better to keep track of charge than energy.  A battery inherently works on pushing charge around.  The chemical energy is stored in a fixed (roughly) number of ions, which translates to a fixed amount of charge that will ultimately be pushed around.

Note that battery capacity is specified in terms of charge, not energy.  That is because the amount of charge is the most constant capacity-type parameter there is.  Batteries are complicated, and even the total delivered charge can vary significantly due to temperature, delivery rate (current), and age.  Still, it's a more reliable metric than anything else.

One way to see that energy is not the way to go is to think of the battery simplistically as a voltage source in series with a resistance.  Even if the total charge delivered by the voltage source is always the same before it goes to 0, the delivered energy clearly depends on the current.  The higher the current, the more of the energy is dissipated in the internal resistance of the battery and is never delivered to the load.  Consider the limiting case where the battery is shorted.  No energy is ever delivered, but some finite amount of charge will be.