Hello,
when the first legendary Hammond Organs were produced in 1935, they featured a pedalboard with 25 keys. Two years later Hammond offered a concert model with a 32-key pedalboard because 25 keys were not sufficient enough.
To play Bach, 25 pedals are not enough, you need at least d' for that. So, obviously, 17 are also not enough.
I have a pedalboard with 30 keys and have not missed f#' and g', however I am sure there is literature that requests it. To be as flexible as possible, I highly recommend having a pedalboard with at least 30 keys.
For a deeper understanding what you need I recommend you take a look at the disposition of organs from the baroque, so the organs you would play baroque repertoire on. Most organs from that time have pedals to c' or d', often without C# or D#.
Kind Regards,
Rico