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 galaxies other than our own. We show an all-sky Galactic survey can be optimally carried out by incoherently combining the LOFAR stations. In a 60-day all-sky Galactic survey LOFAR can find over a thousand pulsars, probing the local pulsar population to a very deep luminosity limit. For targets of smaller angular size, globular clusters and galaxies, the LOFAR stations can be combined coherently, making use of the full sensitivity. Searches of nearby northern-sky globular clusters can find large numbers of low luminosity millisecond pulsars (eg. over 10 new millisecond pulsars in a 10-hour observation of M15). If the pulsar population in nearby galaxies is similar to that of the Milky Way, a 10-hour observation could find the 10 brightest pulsars in M33, or pulsars in other galaxies out to a distance of 1.2Mpc.