TITLE: A quantity associated with a smooth groupoid
QUESTION [10 upvotes]: Assume that $(G,G^0,r,s)$ is a smooth groupoid such that $G$ is a compact connected manifold.
The graph of "source" and "range" 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.
On the other hand, for a given compact manifold  $M$, this quantity for the trivial groupoid structure $(M,M, Id, Id)$  is equal to the Euler characteristic of $M$. Hence this quantity may be non zero.
But I search for some nontrivial smooth groupoids for which this quantity is non-zero. What are some examples of this situation?
Furthermore can this quantity be realised and be reintroduced via some quite algebraic formulation that would be defined for more abstract (not necessarily smooth) groupoids?
In the other word, and with some abuse of terminology, how can one "Noncommutativize" the above quantity "q"?

REPLY [2 votes]: Here are a few more examples and thoughts. 

first of all, it seems to me that it does not necessarily vanish for the particular case of a Lie group $G$, unless $G$ is assumed to be connected. Indeed, in the case of a finite group $G$ I think that the intersecion number is the cardinal of $G$ (unless I clearly misunderstood something). 
Then one can consider the pair groupoid $G_1=M\times M$, $G_0=M$, $s$ and $r$ are the two projections, and $e$ is the diagonal embedding. Then it seems to me that the intersection number is again the Euler characteristic of $M$. 
Consider the action groupoid of a finite group $G$ on $M$: $G_1=G\times M$, $G_0=M$, $s(g,m)=m$ and $r(g,m)=g.m$. You might then get the sum over $g\in G$ of the Euler characteristic of $M^g$. Note that if $M=pt$ then one recovers Example 1 above. If $G$ is trivial one then recovers your example of $(M,M,id,Id)$. 

Concerning your last question about non-smooth issues, I would recommend to look at derived intersections instead (this is somehow already what you've already done by saying that the intersection number of the self-intersection of the diagonal is the Euler characteristic). 
As for the meaning of this quantity, I would first check if this is a Morita invariant one (i.e. it is an invariant associated with the underlying quotient stack of the groupoid). I would say it's not, unless I've made a stupid mistake with Example 2. Indeed, the quotient stack of the pair groupoid of $M$  is a point... and the Euler characteristic of $M$ doesn't seem to be an invariant of the point.