wedge_sampler: optimize triangle counting

Use the smaller edges set to find triangles