U.S. R&D headcount tumbles in key categories