I want to count the number of common relations shared by two employee nodes. I will attach my query
// Employee data
:auto USING PERIODIC COMMIT 5
LOAD CSV WITH HEADERS FROM 'file:///y.csv' AS line
MERGE (a:Employee {empid:line.EmpID})
ON CREATE SET a.firstname = line.FirstName, a.lastname = line.LastName
MERGE (g:Gender{gender:line.Gender})
Merge (a)-[:GENDER]-(g)
MERGE (ag:Age {age:toInteger(line.AgeinYrs)})
MERGE (a)-[:AGE]-(ag)
MERGE (y:Year {year:toInteger(line.YearofJoining)})
Merge (a)-[:YEAR_OF_JOINING]-(y)
MERGE (m:Month {month:line.MonthNamofJoining})
merge (a)-[:JOINING_MONTH]-(m)
Merge (c:City {city:line.City})
Merge (a)-[:CITY]-(c)
Merge (p:Pincode{pincode:line.PinCode})
Merge (a)-[:PINCODE]-(p)
Merge (C:County {county:line.County})
Merge (a)-[:COUNTY]-(C)
Merge (r:Region {region:line.Region})
Merge (a)-[:REGION]-(r)
Merge (s:State{state:line.State})
Merge (a)-[:STATE]-(s)
return a,y,m,ag,p,C,r,s,g limit 25
//Relation between two employees
MATCH (a:Employee)-[r]->(b)
where a.empid in ['789773','158108']
return a,b,r
1)How can I count common relationships shared by these two nodes
2)How can I count most no of relationships shared by any two nodes from whole data.