Beginner question: motion sensor and counters does not work as expected

Post here.