A record number of people were in contact with drug and alcohol treatment in Hampshire last year, new figures show.