Optimizing the number of samples for multi-channel spectrum sensing