Referring to this Economist chart, the total number of operational nuclear warheads possessed by the US reached it peak sometime between 1965–67, after which is slowly declined.
Meanwhile the USSR overtook the US in the mid to late 1970s and continued to accumulate warheads up until right before the collapse of the Soviet Union.
Does the doctrine of mutually assured destruction hold regardless of relative stockpiles once you pass a certain threshold? Do the differences in total warhead count reflect differences in nuclear doctrine or delivery capability?
As I understand it (not an expert) US missiles were much more accurate and reliable than their USSR counterparts. Therefore, to guarantee the destruction of any particular target, the USSR needed to fire more, and larger, warheads than the US / NATO did. As for mutually assured distruction - that is a bit of a movable feast, particularly in the 80s and 90s as weapons got more accurate and an effective first strike option became viable to those who find nuclear war palatable. The US (as much of the land mass is relatively close to the sea, compared to the USSR) was much more vulnerable to a sea launched attack than the USSR; here in the UK, we were basically jobbed. In theorey, the US president and most of the nominated successors could have been taken out by a SLBM launch on Washington. Once functioning government was back in the US, the USSR would have had an absolutely overwhelming number of warheads and the cold war would have ended differently. Sorry - have no references etc - like I said, I don't call myself an expert.
It's a mistake to think in terms of mutually assured destruction. The idea only works if both sides believe in it, and the Russians certainly did not. It also had only limited support in the USA. The other nuclear powers (initially UK, France, China) never had sufficient nuclear weapons to ensure mutual destruction. I'm not sure about China, and the UK does not discuss the use of its nuclear weapons, but France has a stated policy of inflicting unacceptable damage rather than total destruction.
There are a few things you need to keep in mind when looking at these kinds of numbers:
There are major category differences between tactical and strategic weapons. The US "peak" is largely due to tactical weapons, because they feared a Soviet land invasion in Europe. Ditto the Soviet stockpile was largely tactical. The US withdrew most of its tactical weapons over time, because it didn't feel it needed them and there were political issues involved with basing them on foreign soil. After 1991 it got rid of them altogether. The USSR still maintained a large tactical stockpile and Russia still has one.
Total stockpile is not the deployed stockpile. So only a fraction of those weapons were ready to use at any given time. So the raw numbers do not reflect actual deployed forces at any given time.
The exact weapons were not static. Weapons were being retired and added annually. Sometimes in great numbers. New warheads were introduced, new delivery mechanisms were introduced. In the US case, warhead and missile developed largely peaked in the 1970s, when highly-accurate MIRVs, SLBMs, and precise, adjustable gravity bombs were developed and fielded. At that point there is no real need to innovate much further — the Trident D5, for example, gives you over a 90% reliability of putting a half-a-megaton warhead within 180 m, at a range of 12,000 km. That's completely bananas in terms of technical ability.
US missile accuracy was better than the USSR's — this means the US could have more guarantee to do the same amount of desired damage with fewer missiles, with lower yields.
Lastly, the forces of production here are not entirely rational. There are political considerations, for example (in the US, our exponential growth was in part due to each of the military services wanting their own nukes, so they didn't feel like they were being left out). So trying to read a perfect strategy into raw numbers is going to fail; you have to dig deeper into it, and it can vary by time period and country.
As for MAD, etc., the issue here is whether your forces are reliably able to conduct a second strike. That is, can the enemy wipe out all your forces before you can retaliate? Is your deterrent "credible"? Adding more warheads/delivery platforms can help with that, and some kinds of platforms are more survivable than others.
What role did "star wars" play in the stockpile numbers for both nations?