script to get number of signal events in scan