Let $a,b$ be to simple closed loops on a surface $S$ with homologically trivial intersection (more generally I'm also interested in the case when $b$ is 1-codimensional). Denote their intersection on $a$ orientation-wise by $x_1,\cdots,x_r$, with orientations $or_{x_i}\in \{\pm 1\}$. I'm interested in the amplitude of $\mathbb N \to \mathbb Z, i \mapsto \sum_{j\leq i} or_{x_j}$.
Is this somehow a studied quantity? Is there a relation with the geometric intersection number? Probably not, so is there a connection between homotopy representants of $a$ which minimize 1) the above quanitity and 2) the geometric intersection?
Thanks.