There are 78 permanent SPECIAL points in Fallout 4.
- You start off with 28 points.
- You can find a You're SPECIAL! book in your Sanctuary home for another point.
- Can only increase a maxed stat if a debuff like alcohol is used to temporarily lower one of your maxed stats
- You can train all your SPECIAL stats up to 10, so that's 42 remaining points.
- Additional Bobbleheads (for each specific SPECIAL stat) can be found, 7 points.
You can max out your character with 10 in each SPECIAL trait provided every time you level up you simply choose the appropriate training to increase your stats (as opposed to choosing perks).
Remember, there's no level cap, so you can keep on levelling and start getting other perks later.
So you start off with 28, but you can easily improve all of them to 70, should you choose to only train those perks starting at Level 2.
This means 70 - 28 = 42. Meaning the earliest you could max out all your stats is getting to Level 43, while every time you level up putting points in the stat you want to increase, provided you also don't find any bobbleheads along your way.
Additionally, some perks grant permanent increases in stats at specific times of the day or at a certain HP level, so those are technically also "permanent".
No, companions themselves do not have perks that you can select but they will grant additional perks if you make them happy enough. These perks are as follows:
Cait
25% faster AP regeneration if your HP is below 25%
Codsworth
+10 Damage Resistance against robot's energy attacks
Curie
Heal 100 HP when your HP drops below 10%
Deacon
20% more sneak attack and 20% increase in Stealth Boy duration
John Hancock
25% more Critical Hit if you have more than 250 RADs
MacCready
20% greater chance to hit in VATS
Nick Valentine
1 more guess when hacking, additionally, the wait time if you fail a hack is decreased by 50% if Nick is your current companion at the time
Paladin Danse
20% more damage against ghouls, super mutants and synths
Piper
Double XP for completing speech challenges and discovering new locations on the map
Preston Garvey
20% Damage Resistance and 20% more damage when outnumbered
Strong
20% more melee damage if your HP is below 25%
X6-88
Increases Energy Resistance by 20
Dogmeat
Not talking about actual perks in the game but as per the comments there are some unofficial perks relating to Dogmeat, in that he doesn't count as a companion in terms of Lone Wanderer, doesn't talk to you, and doesn't judge your actions. For all intents and purpose, having Dogmeat with you is like not having a companion with you while having a companion with you.
Best Answer
Yes, perks stay with you forever once they are unlocked. Treat them like Pokemon and catch them all.