Help using If statements (ithink)

OK thanks, However i might be right in says the debounce one is needed otherwise the counter will continue to count if my relay (button) is held down. I have set it for 1000ms as this is how long the relay fires for.