Everyone knows the rough number anyways I'd suspect. Publishing numbers is a part of all arms-control treaties, so unilaterally publishing it may be an attempt to show willingness and shame the others towards a new arms-control treaty.
And of course, as the sister comment said, an announcement of dick-size.
While generally it's an advantage to keep information about your true military capability secret, for nuclear weapons it's the opposite.
IMO context is: recent US/PRC nuclear talk broke down. US/RU nuclear monitoring also broke down post UKR war. There is no strategic monitoring system anymore between large nuclear powers. Only mind games now. Throw number out there for deterrence/mind game as everyone is either building out (PRC) or modernizing nuke force (US/RU). Maybe anchoring technique to limit proliferation range. That said, there's no reason US adversaries should believe # is credible. And even if it is, each country has different # of launchers/warheads for deterence posture due to different geopolitical/technological constraints. I.e. ballistic missile defense changes penetration ratios.
it has no reason not to, its a detterent, russia and china needs to believe that the nukes are working and that there is enough for them to ensure the mutual assured destruction.
How would you write treaties governing the number of weapons of various types each side deploys and where they deploy them, if you kept this information secret?
positive press side of updating arms posture in Europe, like the B-52 flight Sunday: