Edge count based compartmentalization of skeletons