According to me, in methylenepyran 8 π-electrons are present as there are 3 double bonds. Therefore, 2 × 3 = 6 π-electrons and 2 π-electrons as one of the two lone pairs of oxygen will participate in resonance.
But the correct answer is 10 π-electrons. How? Are both lone pairs of oxygen are being considered? If yes, then why?