How many bytes would I require to store few seconds of fan controller PWM signal? How many bytes would I require to store few seconds of fan controller PWM signal?

Such PWM is typically around 25Hz, so I think I need to sample it at 50Hz, right?

But what about the bit depth? Since it's a pulse wave (and such takes only values 0, 1 I believe) then 2 bits does suffice, right?

So is the computation then:

50 times per second * 2 bits per sample = 100 bits per second = 12.5 bytes per second of signal?
The easiest answer is: find the maximum frequency in the signal, and double that. In the case of PWM, call $T_p$ the duration of the shortest pulse possible. The signal bandwidth is in theory infinite, but in practice, frequencies above $10T_p$ will contain very little energy. So, you can safely sample the signal at $20T_p$ samples per second.

If you need better fidelity, then sample faster, accordingly.

Now, a PWM signal typically has only two amplitudes, so you can use one bit per sample, or $20T_p$ bits per second.