From Sweden to Bulgaria and vice versa, do they stamp the passport ?
Sweden is part of the Schengen area, Bulgaria is not but applies the same rules. Consequently, the border between them is in principle treated as an external border, exactly as if you were coming from elsewhere in the world.
This means that, to the extent that your passport needs to be stamped at all in the Schengen area (e.g. you are not an EU citizen), it should be stamped in both Sweden and Bulgaria, in both directions.