Multiplicity and energy trigger for a sampling electromagnetic calorimeter