According to the Ordnance Survey, the total length of the mainland UK coast is 11,072.76 miles:
http://www.ordnancesurvey.co.uk/oswebsite/free fun/didyouknow/
It's difficult to suggest a road distance. If you 'cut corners', it might be considerably less than 11,000 miles. However, if you're driving along roads which run inland, parallel to the coast, and take every possible detour to visit every coastal hamlet which is only accessible by an 'in and out' road, it could be far longer.
Chris