There are 3 different positions to Consider when it comes to the two tyre rule.
Dry Race - Only Dry Tyre compounds count towards the two tyre rule.
Wet Race - The Two tyre rule is disabled. A race is classified as wet if rain falls during the race. To be specific, I believe this is from the moment the cars start moving, to the moment the race finishes.
Dry Race with Water on Track - If there is water on the track after the race has started, but rain has not fallen during the race, Intermediate tyres will count towards the two tyre rule.
To be absolutely clear - The race is considered to have started once the lights have gone out and the cars have started moving. Water on the track and rain falling in the 8 minutes between qualifying resolving and the lights going out does not affect the processes above.
Gyuri
Not to mention why, once the rain has stopped, they don't allow you to change tires to dry tires on the grid.
On the grid you have a choice of 3 tyres to start from:
The tyre you set in your main strategy for the first stint of the race
Intermediate Tyres
Wet Tyres
If you set the main strategy to run intermediates for the first stint, you lose the ability to select a dry compound. The best thing to do is usually to set a dry strategy and used advanced strategy to handle when to use intermediate or wet tyres.