SOLVED - Counting a output change in a IF doesn't count right