Dear Great Man,
Welcome back and thank you for your question.
Persons holding a residence permit according to section 25 (5) are not exluded from the permanent residence permit (Niederlassungserlaubnis). In contrast to the naturalization (citizenship), which is unfortunately not directly possible with this residence permit. Subsequently, I see no reason why the 2 years in which you had this residence permit should not also count towards the five years (if your legal stay wasn't interrupted by a period in which you did not hold any residence permit).
Do you agree dear @mbeon-fardeen or @mbeon-Éanna?
I hope this helps and all the best,
Meike