I'm sorry but Akkadian is wrong. Weapons in units do count towards your defence index. They count just the same as weapons in the country stocks. I doubt Justin will see his defence index rise by dismantling his units.
Justin, different weapons give you different defence index points. They also take different amounts of workers which could alternatively be employed in corporations and need different amounts of training ammunition. Thus the more weapons you have, the less profit you will make, whichever way you do it.
As SS says, the best weapons per point for the fewest workers are Missile Interceptor Batteries. Defensive Radar planes take more workers, but don't require ammunition. It's your choice.
Concentrate on defensive weapons though. 50% of their points count towards your DI. With offensive and strategic weapons, only 25% of the points count. If you sell any offensive weapons you have and replace them with defensive weapons, your DI will go up.
However, if you need the DI points to get to the next level, remember that soon they won't count. The GMs are gradually phasing in War Levels and phasing out defence index as a level indicator.
Hugs and respect
Jo