The ATF has actually released total numbers of guns sold in the past, which is far more accurate for all FFL transferred guns.
Looking at the report you can see how many guns were sold in every state, and even a breakdown into various types of guns.
NFA items, which they have tracked the longest and in most detail are broken down by item type and state location.
Of course some LEO and government weapons are included in the total numbers along with weapons held by SOT dealers.
These are not even the most detailed reports:
http://www.atf.gov/statistics/
All firearms manufactured in 2008 down to manufacturer, and caliber (an additional information not added here):
http://www.atf.gov/statistics/download/afmer/2008-firearms-manufacturers-export-report.pdf
YEAR 2008 **
MANUFACTURED
PISTOLS REVOLVERS
TO .22 195,633 TO .22 115,511
TO .25 14,454 TO .32 6,681
TO .32 40,485 TO .357 MAG 105,944
TO .380 278,945 TO .38 SPEC 133,621
TO 9MM 421,701 TO .44 MAG 31,135
TO .50 658,163 TO .50 38,861
TOTAL 1,609,381 TOTAL 431,753
RIFLES 1,612,387
SHOTGUNS 752,859
MISC. FIREARMS 92,564
EXPORTED
PISTOLS 54,030
REVOLVERS 28,205
RIFLES 104,544
SHOTGUNS 41,186
PREPARED BY EYR 1/14/10
MISC. FIREARMS 523 Revised 5/24/2010
There is strict regulations on export of firearms, so
if you subtract the known exported firearms it is easy to determine the number of non-exported firearms that enter the American market every year.
So in 2008 a total of 1,609,381 pistols were made, but 54,030 were exported. So a net change of 1,555,351 pistols occurred in the American market in 2008.
So the exact number of legal firearms that enter the American market every year are known (excluding personally made firearms.)
There is even more detailed reports I have seen.
The ATF also routinely obtains the information on where the firearms are sent wholesale.
They also deal with the manufacturers directly, and records they hold, details of every single firearm they made, from make and model, to serial number ranges.
Information they can obtain during investigations doing traces. They can obtain full records on a huge range of firearms from the manufacturer during the course of investigations.
They know what serial number details and ranges mean what to each manufacturer, and obtain a list of the numbers.
As many are aware of for example they were using such information to conduct "forward traces" and visit a lot of AK purchasers in various regions not too long ago. (To try and see if the guns had gone to Mexico.)
Tracing the guns from manufacturer to FFL and then following that to the purchaser, just to make sure the gun had not got into any trouble, and trying to develop leads.
I might post one of the more detailed reports later.
We will never have a clear idea on how many guns per capita a state buys and sells, or owns,
The number of every modern commercially manufactured firearm is known, and has been known for many years.
When most firearms legally are transferred across state lines from one party to another, a record is created because they must go through an FFL.
So there is a record of where most firearms were at least originally sent on the wholesale market to be sold, including in what state, and the number from there that then were sold into the private market.
So a rough estimate on the number a state has is possible (rough because it does not include private individuals moving in and out of state from another state who take firearms purchased in the other state with them.)
A rough estimate on the number total in the United States is also possible, because the records of manufacturers, how many they made, and how many have entered the American market are also known.