Compute global bonded interaction count from system topology