Looping a map particular amount of times

I know it is possible to infinitely loop a map vertically, horizontally, or both (Map Properties -> Scroll Type). But is it possible to loop a map only a particular amount of times? Like, the map is looped 5 times and after that player reaches the end?
You could instead create a transfer event that loops the player back while increasing a variable until it equals 5. Then set a conditional that stops looping the player once that variable reaches 5.
@BlackGoldSaw Yes, but with transfer there will also be the screen fadeouts (right?) while I want the scrolling to look really smooth (not like entering another map).
@asm_demon, may I ask you. Why do you to loop a map?

@BlackGoldSaw, what is the reason to make a lost forest, or a maze?
@asm_demon Ah, I see. Well as a sort of primitive way you could always copy and paste that area of the map 5 times next to each other so that the player sees the same spot 5 times as the looping area physically will exist as many times as you want.
You don't HAVE to fade to black on a transfer. By default it gives you three choices, fade to black, fade to white and no fade. The only issue with no fade is that followers and events are reset when you transfer as per usual so depending on how you handle things visually it can look jerky.
While I would be extremely cautious using this there is a code you can run to disable scrolling/looping on a map.

Code:
$dataMap.scrollType = 0

Make sure when this code is run you cannot see any of the defined edges of the map. Any events that are outwith the edges will disappear, the player can potentially get stuck in the old looped area and if they don't screen movement will be awkward until it sets fully over the now fixed map. It will make for a very awkward experience for the player if the screen is centered over a transitional edge when this is run, avoid doing this.

Another word of warning, do not attempt to use this to enable map scrolling. It will not work properly. Full stop.
When the Map Loop finishes just put some invisible Events on the Ground, when the player walks over them, you can increase the counter for
the loops the player traveled. And make a condition that if its 5 that you will transfer the player to somewhere else.
you will maybe need 2 events besides each other and than copy paste them from top to bottom, depending on how big your passage is.
the left one, checks if player is facing left, if yes than it decreases the loop variable.
the right event, checks if player is facing right, if yes than it increases the loop variable.

Sorry dont have much time, hope this helps, else let us know if its unclear what i ment.
Thank you everybody for your time and advices! Eventually, I solved my problem in a different way (just created 1 very long map). But anyway, thanks!

Original thread: https://forums.rpgmakerweb.com/threads/looping-a-map-particular-amount-of-times.107087/