added possibility to choose how many times a popup must be displayed