In the context of:
The town has twenty "miles of roads" to maintain.
Cambridge Dictionary says it is both count, and non-count.
In the context of:
The town has twenty "miles of roads" to maintain.
Cambridge Dictionary says it is both count, and non-count.
For words that are both countable and non-countable, I would use the plural for unitless numbers expressing multitude, and the singular for physical quantities with a unit.