Yes, it counts defense. And actually, given that a ton of that money is spent in Texas (many defense contractors, military bases, etc.), that means that if you ignore those things, it would be even more egregiously off-balance.
Another point would be that if Texas seceded in any kind of equitable way, it would be leaving with a proportionate share of that capital. Given that it has spent a lot of the money for the military over the years, there is no reason it would not take its proportion of the equipment, etc. (Admittedly, the military of the rest of the nation would be vastly impoverished, as Texas provides 13% of military personel, far more than any other state, despite having just 8% of the US population).
I'm not aware that it counts FEMA. But Texas gets only tens of millions of dollars a year from FEMA ( http://www.publicintegrity.org/2011/09/29/6762/fema-funds-run-out-senators-states-most-disasters-oppose-funding-bill ). I think we'd be OK.
As for the rest of the things you mention, yes, it counts them.
Again, your whole logic here is so obviously bad that data would hardly even be necessary. The federal government is not some kind of magical money source. It gets its money from people in states. Texas has tons of people, yes, but it also has an economy that would make it the 14th biggest in the world or, by some calculations, as big as Russia's. Its per capita GDP is higher than Germany or France.
Yes, different states receive big benefits from the feds. The midwest gets farm subsidies, everybody gets social security, etc. But that money comes from somewhere. The only way your argument would work is if you showed that, somehow, Texas is taking a lot more out of the pie than it's putting in. In fact, the opposite is true.
As I say, there are plenty of good arguments for Texas not to secede. But magical thinking about the source of federal dollars is not one of the.