added count_indegree lambda