And if I use swallow or spit up will I lose the multiplies boost if yes?
Yes, Stockpile will give you a 2x Defense and SpD. Boost. If Swallow it Spit Up is used, you will go back to your normal Defense and Special Defense. They will be lowered 2 stages of 1 Stockpile was used.
Source: I just tested it.
Don't judge my horrible team.
The Simple ability affects any and all stat changes to the user. If you have 2+ defences from one Stockpile and use Spit Up or Swallow, then your defences will be harshly lowered.