Assume that $(G,G^0,r,s)$ is a smooth groupoid such that $G$ is a compact connected manifold.

The graph of "sourc" and "rang" maps $s, r: G \to G^0$ are compact submanifolds $S$ and $R$ of $G\times G$. To our smooth groupoid we associate the quantity 

                      q= S # R, 

the intersection number of $S$ with $R$.
This quantity vanishes for the particular case that $G$ is a Lie group and $G^0=\{e\}$, the neutral element.

What is an example of a groupoid for which this quantity is non zero?
Can this quantity be realised and be reintroduced via some quite algebraic formulation then would be defined for more abstract(not necessarily smooth) groupoids?