Index theorem interpretation of the spectral flow for a pseudo holomorphic curve Let $(M , \omega)$ be a symplectic manifold, $J$ a compatible almost complex structure. We call pseudo holomorphic strip a solution $u : \mathbb R \times I \to M$ of the equation $\partial_s u + J \partial_t u = 0.$ Given a pair of Lagrangian submanifolds $L_0, L_1$, such a strip is said to be bounded by the pair if $u(s, i) \in L_i, i = 0, 1.$ Under mild conditions, such a strip has limits as $s \to \infty$ that are intersection points between the Lagrangian submanifolds. 
Robbin & Salamon proved that If the Lagrangian intersections are transverse, the Fredholm index between suitable Sobolev spaces of this linearized Cauchy-Gromov-Riemann operator coincides with the Maslov-Viterbo of the strip. Their proof involves general considerations for linear operators of the form $\partial_s + A_s$ defined on the space of paths $\mathbb R$ to some Hilbert space and rely on reducing the problem to a finite dimensional Hilbert space.
However the eventual result admits a purely intrinsic formulation : it states that the Fredholm index of a Dirac operator is given in terms of a characteristic class. This seems like a particular instance of the Atiyah-Singer index theorem, only on a manifold with boundary (the strip) and with totally real boundary conditions.
Can this particular result (index = Maslov class) be obtained through a less coordinate-bound and maybe more striking way ? 
 A: In some sense this really goes back to pre-index theory days
to Vekua and was one of the motivations for the index theorem (for a 
reference to Vekua see Gromov's psuedo-holomorphic curves paper and I think
there is long discussion in Booss and Bleecker).  Vekua proved the following.
Take a map from
$f:S^1 \to \mathbb{C}^*$.  Consider the operator 
$u \mapsto \bar \partial u + a u + b \bar u$
on the domain 
$ u\in C^\infty(D,\mathbb{C})$ so that  $ Re(\bar f u|{\partial D})=0 $
mapping  to $C^\infty(D,\mathbb{C})$. This 
operator has index equal to the degree of $f$.  You can translate
this to a Maslov index.  It forces the boundary values of $f$ to lie
in this line which spins around according to the degree of $f$. 
The index is really rather easy to compute once you
prove that this is a Fredholm boundary value problem. To compute the index, use homotopy invariance of the index to reduce to a model computation so that $f$ is homotopic to $z^k$ for some $k \in \mathbb{Z}$ and $a=b=0$.  Then  the kernel consist of holomorphic functions $u$ on the disk which satisfy the boundary condition, if $k\ge 0$
these are the real span of the polynomials 
$iz^k, z^{k-1}-z^{k+1},z^{k-2}-z^{k+2},\ldots$  so that  its dimension is $k+1$. For $k \ge 0$ the kernel is zero.  The cokernel consists
of anti-holomorphic $v$ functions which satisfy the adjoint boundary condition
$Im(f v|_{\partial D^2})=0$.  For $k\le 0$ a real basis is given by 
$\bar z^k, \bar z^{k-1}+\bar z^{k+1},\bar z^{k-2}+\bar z^{k+2},\ldots$.
Thus the index is $k$ no mater the sign of $k$.
A: I try to elaborate on my own comment to Tom Mrowka's answer.
Assume that $f : \mathbb S^1 \to \mathbb S^1$ is càdlàg and has a unique discontinuity point at $1 \in \mathbb S^1$. This discontinuity is therefore a "jump" by a certain angle $\alpha.\pi$. This matches the behavior of the function $f_\alpha : z \mapsto (z-1)^\alpha,$ so that upon normalizing inside $\mathbb D^2$ by this holomorphic function, the problem reduces to the modelization proposed by Tom Mrowka.  
By using multiple such normalizations, one gets a geometric description of the virtual dimension for discs with marked points on their boundary, each segment thus delimited abutting on a different "real condition", as relevant in the study of products in Floer theory.
A: This may (?) help: The Atiyah-Patodi-Singer index of $\partial_s+ A_s$ on the pullback of a the bundle supporting $A_s$ via $N\times I\to N$ is equal to the spectral flow of $A_s$, this is fairly easy to see, and explained in Atiyah-Patodi-Singer (and in particular is equal to the integer jumps of the corresponding eta invariant).  There are many papers that relate various forms of   spectral flow to Maslov index, eg. http://www.ams.org/mathscinet-getitem?mr=1369400  and typically the  technical problem is to deal with "non-clean" symplectic reduction to go from an infinite-diml Maslov index to a finite dimensional Maslov index  related to the geometry. 
