Lilypad on the move

First off, post your entire code.

Now, your missing a key piece of information - the accelerometer would feed back analog values (0 - 1023), not a HIGH or LOW (that's digital logic). For your concept to work, your code will have to be a bit more complicated --> what is the actual application? What do you consider one "count" to be? (e.g.: One hand wave upward then back down, or one jump up and down... it matters, so let me know pls.)