The length of the coastline is proportional to the scale of the measurement.
If you measure in miles, you get one value.
If you measure in yards and convert that to miles, you get a larger value because the number of bumps and indentations in the coastline you can measure and don't have to average around is larger.
If you measure in inches and convert that to miles, you get a larger value still because you can now measure around every pebble and crack in the rock.
Take your measurements down to an infinitely small scale and you get an infinitely long coastline.
With regard to the length of coastlines, there can be a limiting value such that as X, the unit of measurement, approaches zero, Y, the length of the coastline approaches a number Z less than infinity.