Pathfinder Behaviour // Getting current waypoint count

Hi!

I would like to use the pathfinding behavior based on action points for my enemy ai. For example I want the enemies to move to the player. My plan is to find a path to the player and then stop the enemy when reaching a certain waypoint (e.g. 3 action points left = 3 waypoints).

Is there a way to get the current waypoint count on a path or maybe a function for knowing whenever a waypoint is reached (then i could add a +1 counter for every waypoint reached)?

Thanks in advance!

I think i found a good solution.
I now count the action points for every collision with tile objects in the background.