I have a large series of digraphs generated by r (from 5x5 adjacency matrices). Within this set, I would like to count the number of digraphs which are cyclic (A->B->C