Immortals hard counter them. Strike cannon will be the only way the thors would win, and I think there's been maybe one match that I've ever actually seen it used. If they've got the strike cannon, colossi can beat them with micro. --- So basically communists are druids. -Gestapoid
Early game: Zealot-Stalker-Immortal Mid game: Stalker-Collosus-Void Rays Late game: Stalker-Carriers-High Templars --- Not changing this sig until the Denver Nuggets win the NBA Championship -- Started 3/9/09 "I can eat anything that tastes good" - Saber
You shouldn't ask for "this unit" type of answer, as it really depends on when they come and what you have at the time.
For example, if you know they are going mech you should have a decent amount of Immortals out already (for tanks and future Thors).
Say you don't have a robo out at all, then you most likely have access to Charge. This works very well if you can get a surround on them.
Anyway, I'm not saying the advice so far is wrong, just make sure you make something that makes sense with what you currently have, instead of always thinking you need one specific unit to counter them.
*Also, feel free to avoid the Thors for as long as you can. Get a Warp Prism and drop/warp in, split your army up and do multi-prong attacks. Take advantage of the fact that Terran mech is very immobile. --- "We do not stop playing because we get old, we get old because we stop playing." -- George Bernard Shaw