dS
is the integration measure over interior facets, see for instance: Integrating over an interior surface - #2 by MiroK
while ds
is the integration measure over exterior facets.
Dolfin follows your physical tags (as they are read in from XDMFFile, which you can visualize in Paraview).