Just looked it up. SF is down to two (2) permits issued and four (4) pending. Of six, only two active permits.
Those would be, of course, the LEGAL guns.
One can also get a gun permit much easier in northern California. Lots of guns up there, pistols, rifles, you name it.
One can get an illegal gun too, I suppose, from the scuzzballs and gangsters of the world.
A couple of big mean dawgs (NOT dogs) also do the trick.