In the picture...
You need to check if the 2 wires are connected together at the receptacle, if they are great just connect em all together. or check if they are both on the same circuit.
If they are separate, one wire is running the top recp. the other is running the bottom recp. and they could be both on different circuits. In this case you should NOT just connect all the wires together. asking an electrician would be a good idea.
If Seperate, you could just ignore one set of wires comming in and hook up just the other to the new switch.
BUT, if they are connected, its most likely an in & out wire (one wire comes in - to plug - the other wire goes out - to another plug called daisy chaining) connecting all the wires is fine here.
remember, having them separate means you could say plug a fridge into the top and a microwave in the bottom as they are on separate circuits (or should be), if they were connected together using a fridge and microwave on the same plug will almost max that circuit, which isn't good if other recp. are in that specific circuit.
LOL, hope this helps you understand the 2 different connections possibilities at the receptacle better.