Well, it would be 4, wouldn't it?
The Ghost-type has 2 immunities (Normal and Fighting). It has the most immunities of any type. Since 2 is the max number of immunities, that means any other type can only have 1. So if you added together 2 types that already have an immunity, like Steel and Flying, then used Trick-Or-Treat, you would have 4 immunities. a Steel/Flying/Ghost type's immunities are thus:
- Poison
- Ground
- Normal
- Fighting
The types that have immunities are:
- Flying (Ground)
- Ground (Electric)
- Fairy (Dragon)
- Steel (Poison)
- Normal (Ghost)
- Dark (Psychic)
- Ghost (Normal/Fighting)
So potentially adding Trick-Or-Treat to a combo of these types could work. For example, Steel/Fairy/Ghost would be immune to Dragon, Poison, Normal, and Fighting.
Note that Forests' Curse and Trick-Or-Treat are the only moves that add a type, and Soak merely changes the target's type to pure Water. Also, if for instance, you used Forest's Curse on a Pokemon already affected by Trick-Or-Treat, then Trick-Or-Treat would cancel out and the opponent would only have an extra Grass typing.
If the target already has an additional type added to it by Trick-or-Treat, that type is replaced with the Grass type. Forest's Curse will fail if the target is already Grass-type.
Source
There are other ways to add immunities with items and abilities, but you don't want those, so it's safe to say the max immunities from typing alone is 4.