Spain registered more than 5,000 heat-related deaths from June to August, data from a public health institute showed on Tuesday, a record since the start of its statistics in 2015.