BBC Scotland asked each of Scotland 's 32 local authorities how much they had paid out to the public in compensation due to claims arising from road defects , such as potholes , in the past five years .