I'm looking to do something interesting with 16-20 laptop and computer fans. I was wondering if this was possible to just connect them to a large battery and then use a trigger to control some power switches or something.
1 Answer
The title asks how many, but the question asks whether 16-20 is possible.
You have (more than) 20 GPIO pins so 20 is easily possible.
The absolute limit is practically infinite with simple extra hardware - for example you could chain practically any number of shift registers to give you, to all intents and purposes, any number of outputs you like, provided you don't need to control them particularly fast.
In either case you cannot run relays directly from the Pi - you will need transistors to drive them, to prevent too much current from being drawn from the Pi's outputs. Most "relay modules" seem to have these built in, whereas if you buy literally a "relay" it won't.