If you know the intial state and count the clicks you can tell if it's on or off...
That is... if it starts out being off and you click it an even number of times, you know it's off... an odd number of clicks tells you it's on. (This premise is beyond easy to test, unless you don't have lights in your house...)
Now... how can you apply that to your problem?