Depends too much on your micro skills. In some cases zealot sentry can counter roaches without a problem. In most cases the roaches just tear through the units.
There are a couple of known counter types:
-Soft counter is for example the stalker to the roach. The stalker has a bit of more range and deals extra bonus damage. When equal supplies of both units clash, the stalkers will win (with significant losses)
-Hard a hard counter is a unit who specializes in destroying units of a specific (armor) type. For example the immortal vs siege tanks, the hellions vs zerglings, collosi vs marines.
-Universal - when the countered unit can't really do much against the counterer. Banshees vs baneligns is a good example here.
-Mobility - Mutalisks versus roach hydra. Although not as viable anymore due to the buff of the spore crawlers, when you can outmaneuver your opponent you can easily go for a base trade and win a lost game. For a lot of months in WoL, pvp was basically, blink stalker(mobility) versus immortal sentry (strong counter, but very immobile) and the match up ended with base races.
Note: Mobility requires control.
So, just think of the ways you can build any of the counter types given your economy, map and when you think he will attack.