MATLAB: Is there an easy (automated) way to determine if vertices are ‘mutually adjacent’ in a directed graph

directed graphmutual adjacency

I am comparing two directed graphs containing 253 vertices. The first graph contains around 1100 edges, the second graph contains around 1800 edges.
For each graph, I would like to know the number of 'mutually adjacent' vertices. When I say mutually adjacent I mean that one directed edge connects Vertex A to Vertex B and a second directed edge connects Vertex B to Vertex A.
Essentially I am trying to quantify how many pairs of directed edges effectively constitute an directed edge.
I don't need to know which specific vertices are mutually adjacent, just the quantity.
Thank you.

Best Answer

For a square adjacency matrix A that contains non-zero values to indicate links (not necessarily 1), then
nnz(tril(A & A.'))