You can get a rough estimate on how many possible nukes a country has by the international nuclear agencies. I'm not sure exactly how it works or which agencies are involved but the international trade in nuclear materials and technology is regulated. So if a country wants to have nuclear power for electricity or trade in it like with uranium, you have to be a member or else countries like the US will make it difficult for the country by leading other members to follow suit according to the rules. It's rule by gangbang much like the missile technology control regime (MTCR). It's not international law but all members are suppose to join together to take action against members violating or force a non-member through gangbanging pressure. One of the requirements being a member is allowing these international agencies into whatever country's nuclear facilities for inspections. There they will cross check with their records all materials the country has which tells inspectors how much plutonium could've been produce and if any materials are missing from inventory. You can estimate how many nuclear weapons could be made from it. Of course there are holes in the system because for example a country that has it's own uranium deposits could hide it but they most likely will still need to buy the technology to process it hence why the selling of those technologies too are regulated and reported.
That process is primarily to ensure countries cannot develop a nuclear weapons programme from civilian nuclear tech and materials bought for civilian nuclear plants.
It keeps tight track of nuclear materials purchase from the global civilian nuclear markets, and inspectors need full access to all facilities where such nuclear materials goes.
But inspectors will have zero rights to access a recognised nuclear power's military nuclear facilities, because the whole point is that none of that material should ever end up at a military nuclear facility.
Being part of the NSG allows a country to devote its entire domestic nuclear materials deposites to weapons while relying on foreign imports for its civilian power needs.
That is why there was so much objections and distaste when Bush forces an Indian sized hole in the NSG rules to allow India membership even though they refuse to sign the nuclear test ban treaty.
But back to the point, being part of the NSG does not mean China could expand its nuclear weapons sticks by importing nuclear materials, but it does nothing to stop China from expanding its nuclear inventory with domestically sourced materials.
I tend to believe China has a modest nuclear warhead stock, but probably has vast weapons grade nuclear materials stocks that could be turned into new warheads very quickly.
That is a kind of best of both worlds solution that is typical of the Chinese.
They get to play the responsible party card by pointing to their modest warhead inventory; do not have to spend vast sums on warhead maintenance and security; do not have to worry about warhead aging and obsolescence; can apply the newest technologies and breakthoughts to its warheads (Chinese supercomputer tech has vastly improved in recent decades, allowing for far better warhead designs through modelling that was simply not possible before); but can rapidly expand its warhead numbers if a nuclear arms race happens.