How to popup form based on number of pages visited

Hi,

I am writing you as I built a pop-up modal form to collect an email address when users visited my website.

I would like to make appears the pop up only after users visited 3 pages. Whatever the page users coming from, it has to apply I guess custom code and show the pop-up modal.

If someone managed to get this issue sorted, please let me know how you did it.

Many thanks for your time given,
Aurélien, from Drover Club

here my webflow project link : https://preview.webflow.com/preview/dcproject?utm_medium=preview_link&utm_source=designer&utm_content=dcproject&preview=264a791c40b4a0aed19800d078ce1bfc&pageId=618963d137fd31f9420f02d2&workflow=preview

Does anyone have a solution?