In the early game, if the Terran player goes for marauders (with upgrade), what can a Protoss player do to effectively counter this? Zealots seem to be ineffective, and while stalkers are a little better, they still seem to die quickly to them.
As far as i remember marauders do additional damage against stalkers, so your best option would be a mix of zealots, sentries and stalkers.
Zealots will take damage away from the stalkers unless the enemy focusses his fire (which then would allow the zealots to close in on the marauders). The sentries reduce the damage from the marauders, giving you an important advantage. They can also block his retreat or cover yours and cut of parts of his force. The stalkers can either blink in (warning: dangerous) to quickly get in range as soon as the enemy starts attacking the zealots or - with a little micro - you can blink out as soon as a stalker looses his shields.
Another option, though more long term, would be to switch to air as marauders are ground-only and it might be possible that he focussed too much on marauders so he has little to no anti-air.
1-1 a Stalker will lose to Marauder. The loss is exponential as you add more even numbers of Stalkers/Marauders.
1-1 a Zealot (w/o charge) will lose to a Marauder with concussive shells and good micro.
However, because of the armor types and damage, Zealots can actually counter Marauders if they can get close enough.
The correct approach for dealing with early Marauders (i.e. too early to have charge, or immortals), is to have a well balanced composition of both Zealots and Stalkers (maybe 1 or 2 Sentries). If the Terran player tries to kite your Zealots, the Stalkers will have an easy time firing back as they are much faster than Maruaders, Marines and Zealots. If he targets the stalkers, and not the Zealots, your Zealots will have enough time to get in and do terrible terrible damage.
In any case, I usually prefer a Void Ray tech to force the Terran into doing a marine heavy build. I then tech to Templar to counter the bio ball. With Templar, feedback can kill ghosts and medivacs, and marines don't really have a defense against storm.
Also, because you have the stargate, you can easily build phoenixes to lift up tanks if he goes mech.
Coming from the view of the Terran player, it will be easy to pick off your Zealots with some simple micro after the concussion shells are upgraded because they slow the units. Stalkers are the thing that annoy me if I'm trying to do this because they have the same range as the Marauders. If I'm picking off Zealots the Stalkers can target me, if I try to go for the Stalkers the Zealots can get close enough to cut me down. So I'd say be fast and get a mix of the two in your starting defense. A photon cannon or two should complement this as well.
The correct strat would be to do a quick transition to Void Rays, Colossus or Immortals, were Marauders are a pain in the early game before you get zealot charge and are better against all of the gateway units. They are however weak against immortals and cant attack voidrays. You just have to watch out if they have more marines in the terrain ball then you may even want to go to with Colossus because they will make quick work of marines and a group of 6 marines will destroy a void ray easy.
sentries stalkers and immortals when microed right can do a nice counter use the sentries to block off the marauders and use a forcefield to weaken their strikes, then use your stalkers to do damage. Immortals also have a bonus defense against marauders.
There was a youtube tutorial video about this exact setup. The protoss demonstrated that skipping the early stalker/zealot, and going straight for colossi is a viable choice.
Your goal should be to get the first colossus out as soon as you can, while producing a single Sentry, and blocking your entrance with force field. This requires you to be very very aware of the enemy troops, because he will try to stimpack his army and run up your ramp, and if he succeds, you are done.
You need to shut them out at the bottom of your ramp, anything above the lowest level will result in your enemy having vision on your buildings on the cliffs. You need to get the sentry out early, so it has mana for more than one field.
While your first colossus is building, start producing Stalkers/Zealots. Try to abuse the Colossus' ability to walk down cliffs, and get free shots at his army, Thermal Lance helps greatly with this.
I would recommend holding your own ramp with zealots, cannons and a sentry while you tech to a robotics facility.
If he is going with a barracks-heavy build, then you will need collossi and/or immortals. Chronoboost zealots until you robo finishes, then chronoboost out an immortal. The first immortal should help immensely in fending off marauder spam.