SumOfValencies

SumOfValencies(R, L) returns the sum of the valencies in the list of relations L.