Assume your sampling frequency (fs) is 500 Hz. If you want to capture the 50Hz signal for 5 seconds, calculate the number of samples (N) at the assumed fs to get the desired 5 seconds of data.