(A turn is any point where the path changes its direction ; for example path shown has 3 turns.) I have written a code to analyse any pattern. I am focussing on smaller things and losing the bigger picture. Is there a way, we can solve the given picture in mind.
Here is the code to print expected values (https://ide.geeksforgeeks.org/WqafdrG7m7)
See Image for reference]1
Start with five $1$'s (corresponding with steps to the right) and with four $0$'s (corresponding with steps upwards).
Then the sequence corresponding with your example will be $110001110$.
We are interested in the expectation of the number of subwords of the form $01$ or $10$.
This expectation equals: $$\frac{2\times5\times4}{5+4}=\frac{40}{9}$$
or in a more general form:$$\frac{2ru}{r+u}$$where $r$ denotes the number of $1$'s and $u$ the number of $0$'s.
Have a look at this question and its answers to find out why.