uva 10926 - count dependencies (DFS for every node as source to avoid
counting nodes twice)