Number of deaths while homeless rose by almost one third over four years