Several times, I haved formed squads of 4 or 5 that have one unit with the stealth special rule. Does it affect the squad's cover when the squad is shot at, even though only one trooper has the special rule?

Because members of a squad are considered to be anywhere on the board, the entire board would have to be in cover, I would give the attacking player the option to attack the model with the stealth rule individualy or totally ignore them. In short, putting them in the same squad would cancel this rule, don't do that.

Even if the unit were completely invisible, he can get hit just the same when people shoot at the rest of the squad. Unless the whole squad is stealth, and there is cover for the entire squad plate, I don't think stealth would give a single unit any advantages.