Measuring the temperature of cold many-body quantum systems