yEd without complicated math, take the max connections this is 1. Then take the number of connections for the object and divide by the max number of connections to get the value shown (make sure to consider if in, out or both are checked). For example 4 edge connections max, a shape having only one connection will have a value of 0.25. If the max connections is 3 and a shape has two edge connections the value for that shape will be 2/3 or .67.