Set how many times per day show popup

Hello, how do I set conditions for displaying a popup x times in an interval of time?
For example: not more than twice a day?
Thanks

Stefano