score:8
Burhan’s answer is only semi-correct.
Regardless whether you’re planning to leave the airport in Warsaw or whether you’re planning to fly on to Milan directly, Warsaw is your first port of entry into the Schengen area. Therefore, your passport stamp will be given in Warsaw and your 90 days start counting in Warsaw.
In all cases, your connecting flight would be intra-Schengen with no additional passport controls so immigration has no way of checking whether you boarded that flight on a specific day.
Depending on the length of your layover, your luggage may get through-checked to Milan or not — reading eight hours I am going to assume it is. This is great, because that means you won’t have to take care of luggage in Warsaw. Customs (which is very separate from immigration in Europe) will take place at your final destination, Milan.
Upvote:1
Your passport will get stamped at the airport where you exit the border control. So, if you want to spend time in Warsaw, that's where your passport will be stamped and effectively - you have started your 90 day clock.
Your next flight (Warsaw - Milan) is an intra-schengen so there are no passport stamps or visa requirements.
Upvote:5
For border purposes, Schengen operates as a single country, so Beijing-Warsaw is an international flight, while Warsaw-Milan is a domestic flight.
When flying London-Beijing-Shanghai, you get stamped at Beijing because that's where you enter China. Equally, when flying Beijing-Warsaw-Milan, you get stamped at Warsaw because that's where you enter Schengen.