K (oK), 37 2929 27 bytes
Solution:
+/2!.#:'=+\1 '=+\-199 -0 99 99"^v<>"?-1 1@5!
Explanation:
Create list of steps, create path, group, count each repeat, if mod 2 is 0 then off, else on. Felt very AdventOfCode-ish.
+/2!.#:'=+\1 '=+\-199 -0 99 99"^v<>"?-1 1@5! / the solution
5! ? / lookup right in left
input mod 5, "^v<>" /yields up,4 down,3 left,0 right2
1 -1 -99 99 0 99 -1 1 / upleft, downnull, leftright, rightdown, up
+\ / sum along
= / group into key=>value
#:' / count each value
. / take the value
2! / modulo 2
+/ / sum up
Notes:
- -8 bytes by stealing David Horák's method of squashing x-y into x (I know it has limitations, but it works for the examples)
- -2 bytes thanks to ngn