Could someone explain what this formula is saying?

=ROUND(((IF(COUNTIF('X Sheet'!J45:J128,"Apples")>0,IF(COUNTIF('X Sheet'!J45:J128,"Oranges")>0,0.5,1),0))*Management*(VLOOKUP('X Sheet!J31,Groceryprice,4,FALSE)))/100,0)*100

The IF and COUNTIF are throwing me off.

Thanks