Sainsbury's plans to reduce its headcount by over 3,000 roles as it seeks savings to counter a "particularly challenging cost environment".