private void countConnections(Bone bone) {
        for (Bone child : bone.getChildren()) {
            ++connectionsAmount;
            this.countConnections(child);
        }
    }
This method counts the connections between bones.
@param bone
           the bone where counting starts
jme3-core/src/main/java/com/jme3/scene/debug/SkeletonInterBoneWire.java