I can't see what I'm doing wrong, see below blocks.
I'm trying to learn to use the Canvas to count screen touches, to ultimately use BrightnessTools to toggle screen brightness from 60% to 0, and to 0 and 60% when double-touched.
If you mean your tap count to alternately rise and fall in a saw tooth wave, you would need an extra global variable to remember the direction (rise/fall) and change your limit tests to < and > against your upper and lower limits to decide when to switch direction.
I am not sure what you mean by double touch.
Two fingers simultaneously (needs an extension), or
One after another?