We investigate the number and type of pulsars that will be discovered with the low-frequency radio telescope LOFAR. We consider different search strategies for the Galaxy, for globular clusters and for other galaxies. We show that a 25-day all-sky Galactic survey can find approximately 900 new pulsars, probing the local pulsar population to a deep luminosity limit. For targets of smaller angular size such as globular clusters and galaxies many LOFAR stations can be combined coherently, to make use of the full sensitivity. Searches of nearby northern-sky globular clusters can find new low luminosity millisecond pulsars. Giant pulses from Crab-like extragalactic pulsars can be detected out to over a Mpc.