The basics:
On start of layout, set variable "howmany" to int(random(10)), set variable "canspawn" to 1
variable "canspawn" = 1
->variable animalcount< variable "howmany"
-->every 1 seconds, system create object animal at random x y, add 1 to variable animalcount
I would suggest looking up how variable comparisons work, globals, instance.
Note loader complete is for loader layouts, stick to on start of layout.