It sounds like your problem is less, "I need a counter" and more "How could I have known?"
First off, you said you scouted him but he proxy'd his Barracks (hid it outside of his base). Let's go over the ways you could have still seen this coming:
- Usually not seeing a Barracks is a good sign he's Proxying.
- Watching for a very early Vespean Refinery is usually a sign of some sort of early Marauder/Reaper play
- Finally, many top Protoss players default into 1 Gate -> Cybernetics Core to set themselves up to stop this.
What else could you have done?
Some guide will suggest skipping that first Zealot, but if you can squeeze him out (Zealot has a 33 sec build time compared to the Cybernetics Core's 60) he serves as a good distraction to keep the reapers off your probes.
Make sure to save some extra chrono boosts to boost out a Stalker. While early game you should be using these on Probes, once you start building the Cybernetics Core stop using them and save them for the Stalker.
Another problem you had was a Bunker slipping in. There are a couple ways to stop this, but most prominently walling off your ramp. You can do this with your Gateway/Cybernetics Core, or leave space and place that first Zealot there. Alternatively, you can build an extra pylon closing off that small space with plans to kill it later.
Once he does start building the Bunker, you can use either your Stalker or even your Probes to try and kill it during production (or even better the SCV building it). The follow up will usually be a large number of Marauders so you can either push out Zealots to deal with this (its unlikely he'll have concussive shell this early), or a Sentry. With the Sentry you'll want to use force field at the bottom of your ramp to keep him from moving up and gaining sight. You can then use your Stalker to prevent Reapers from giving sight and to target the helpless Marauders.
In any case you should consider your next move. Are you going to go Robo? get out an early Immortal. Or do you want to throw up 2-3 Gate and out produce him (as he's seriously cut production).
One of the things you'll notice is that as you continue to play, the time it takes you to get out that first stalker will rapidly decrease. A Reaper rush really trades on the opponent not seeing it, and not being very experienced.
Before we discuss counter builds, let's talk about what an early Zealot rush is:
"my defenders got wiped by 4-5 zealots and more and more zealots kept pouring in and eventually killed me"
This is the dreaded 2 Gate rush.
Your first goal is going to be identifying it. Luckily this is fairly easy to do. If you scout with your 12-13th drone/probe/scv you should get to your opponents base while his first Gateway is still building, worst case while his second is. All 2 Gate rushes start the same: Pylon, Gateway, Gateway, Pylon. This makes them very easy to pin down. If you see that second Gateway go up before the Cybernetics Core you know he's playing some sort of rush (pro tip: you can click on a Protoss building warping in to see what it will be). If he does a delayed rush, chances are you'll already be in a better position to defend, so you really want to watch out for this early rush.
The attack that will come should be 5 Zealots with 2 more in route (obviously he may wait for more or less, but this is the best time for him to attack).
As Zerg a 2 Gate opening is one of the scariest things to deal with (right after Hellion harass into Mech). If you fast expanded, use the expo as a damage soak and cancel it before it gets killed (if you can). Ideally you'll want to keep that expansion alive as his economy will already be devastated. When you scout a 2 Gate, you'll want to build a Spine Crawler almost immediately. Additionally, a Roach Warren is also recommended. Roaches are very strong vs Zealots (slow attack and starting armor vs a unit with fast attack) and if you can position some by your ramp or other choke you can cut the surface area of your Roaches in half. If you're already into a more speedling based build, then you're going to want to wait for him to surround your Hatchery or engage your Spine Crawler. This will naturally give you a very nice surround on his units as they will spread out. I also recommend bringing your Queen along for ranged dps (and to infuse the Spine Crawler).
The key thing for Zerg about repelling a 2 Gate play is the recovery. Early 2 Gate is so effective that even though he is putting himself at an economic disadvantage, he may do enough damage to your economy to win. You'll want to do the following: Put an Zergling outside his based (this is a scout for his next move); Tech to Roach or Hydra or Muta, as 2 Gate will likely lead into 3 Gate, 3 Gate + Robo or 4 Gate; Power drones, this one is key as he's making a huge economic sacrifice to push with 2 Gate and you need to exploit this for victory.
Terran traditionally have less problems with 2 Gate as they can usually wall off before the Zealots get there. If you already have Vespean Gas then its ok to go for Marauders with Concussive Shell, however, if your strategy didn't include that, you're going to want to skip add-ons and throw down a second Barracks when you scout the second Gateway. With Marines faster build time, you can create a tough Marine force behind your wall well before his Zealots arrive. This ruins the fact that he made an early sacrifice to go for a Zealot push and should give you command of the match. From here is very easy to transition into an MMM or even BioMech which should give you a quick victory.
As Protoss you're going to also want to wall, stick a Zealot or two in the opening and push for Stalkers. If you can have enough 1 Stalker out and your opening plugged before he gets there, chances are you've already won. It is not unusual, upon seeing a 2 Gate, to throw down a second gateway yourself. As defender you'll naturally have the advantage as his troops have a longer rally distance, and you can control the choke. If you push out an early Sentry, he'll probably Rage Quit and call you a cheater.
Now if you're dealing with a Proxy Gate (which is different than a 2 Gate) you have slightly different things to watch for. Lack of Assimilators and Pylons in his base are your best clue. At this point you'll want to start taking your scout and covering all the corners of the map. Additionally move a scout to outside your natural or the nearest Xel Naga tower.
Best Answer
Dealing with a cannon rush as Protoss is very different from dealing with it as Zerg. Creep prevents the placement of buildings in a lot of places, so a cannon rush against Zerg is largely used as a contain. This is not true for Protoss.
A number of people have suggested countering, or getting up defense, or expanding, but against a standard cannon rush (8-10 Forge) chances are you don't have time for any of that. They should be finishing their first cannon around the same time you are finishing chrono boosting out your first Zealot. With a very early cannon rush like this, if you do not catch them throwing down that pylon, you will not survive. They've made a huge economic sacrifice and this will be an "all-in" for them.
This is a very scary situation to be in and even at high levels (~1200 Diamond) a fast cannon rush like this a guaranteed win if its not scouted (and still 20-30% effective when it is). I'd recommend the following recourse:
I highly recommend you practice against this with a friend. Go on Lost Temple and have them sneak a pylon in the back of your base so it overlaps the cliff. They'll follow up by putting their forge on the low ground and the cannons on the high ground (that means 2 probes). If they get out the first two cannons before your Zealot arrives, restart. You want to nip this in the bud.