I have noticed certain pattern in figural reasoning while preparing for the civil service entrance examination in my country. That is, given any polygon made by sticking together squares of the same size side-by-side, its number of internal angles of $90^o$ minus its number of internal angles of $270^o$ seems to be always $4$ (assuming that there are no 'hole' in the polygon, or put it in another way, it is simply connected).
For example, the first polygon in the following picture has $5$ internal angles of $90^o$ and $1$ internal angle of $270^o$.
I think this phenomenon may be proved by some elementary methods (induction, for example), but I wonder whether there is a more elegant explanation? In particular, I wonder whether it is related to Green's formula or de Rham cohomology (since I remember both require simple-connectedness).
P.S. I am just an amateur, so please do not laugh at me if I overthink :)