Added possibility to specify number of events manually in JSON