Count like Dijkstra

Use zero based array index: http://tools.ietf.org/html/rfc6901#page-4