HELLO SHRIKANTH,
this problem can be solved out by two methods
i will give you both the methods
Method 1
By drawing the structure of phenol,you know that phenol consists of 1 ring
so you can consider n=1 for cyclic compounds
and you will get 4n + 2 = no of pi electrons
so answer is 6 pi electrons
Method 2
Phenol consists of 3 pi bonds
So 3X2 = 6 pi electrons
this is liitle bit simple method
but you can wish whichever you want which is comfortable
THANK YOU