indegree function

Determine in-degree for each node in a model