Since Dave's VI was saved in LV 7.1, here's my contribution.
You use a shift register to check in each iteration of the loop whether the boolean value changed, and if it has whether it has changed to T or F. If it has changed to T, you increase the counter.
Keep in mind that this code can't catch changes that happen quicker than the loop rate - that means that if the value changed to T and then back to F before the loop could start again, it won't detect it. This is good for user input, but if you want software or hardware input, there are other methods.
___________________
Try to take over the world!