The command line option -r is used to set the maximum number of events that slic will run.
slic -g mygeom.lcdd -i events.stdhep -r 1
The actual number of events may be less, if you have a file-based event source like a StdHep file that has fewer events than the specified maximum.
The Geant4 built-in command /run/beamOn is the corresponding command.
/run/beamOn 1