Demand increases: If demand increases by rightward shift of the demand curve from d to d1, then equilibrium quantity rises from OX to OX1. The new equilibrium point is E1. The new equilibrium number of firms is n1(where n1>n0) because of entry of new firms.
Demand decreases: When demand decreases from D to D1, there will be excess supply, firm will lower the price.It will lead to exit of some of the existing firms and the price will again reach OP level.