Hello!!
Some background info would be welcome.
I have no idea of what you are trying to do.
What does it mean? Do you want to count the button presses?
Me neither. There is no Wx or Bx in your code. Assuming Bx would mean
B1, B2, etc... I would expect to find strings like that, but there are none.
Some schematic would be helpful. And also the environment you are using to
program, etc. And you don't say exactly what does not work...
Then describe it fully. Someting like this:
As this value is more than 10, I should expect bxxx to be low but it is high,
etc, etc...
Dora