https://docs.unrealengine.com/latest/INT/API/Runtime/Engine/AI/Navigation/FNavigationPath/GetLength/index.html
There is a BP node called Get Path Length as well.