How many different outputs/inputs can I have on an arduino?

Hi there! I hope this isn't a stupid question, as I'm just getting started, but I'll soon be picking up an Arduino computer, and have an idea for a specific project. For my project, it needs a few inputs and outputs, and I was hoping to find out how many I could possibly have?

I know I'll need one power source for the Arduino, but I'm hoping to have two relays that the Arduino controls, (both with their separate power sources).

So I'll need possibly six input sources, (sensors) And I'm going to need 3 output's, 2 of which have their own power sources. 2 Motors, one light.

Is this possible? Thank you, everyone!

Ian

Which Arduino are you getting? There are several different ones. A Uno has 13 digital input/output pins. 2 of those pins (0 and !) are used by hardware serial for programming. There are, in addition, 6 analog inputs. The analog inputs can be used as digital if necessary.
The number of inputs and outputs can be expanded into the hundreds using shift registers, port expanders or multiplexing.
You will need a transistor to drive the relay coils as the absolute maximum current a digital output will supply is 40 mA. 20 mA to be safe. Don’t forget the flyback diode across the relay coil.

(0 and !)

[Where '!' is an uppercase '1']

groundfungus: A Uno has 13 digital input/output pins.

20 input/output pins. All of them can be used for digital input/output.

[quote author=Nick Gammon link=msg=2177354 date=1428476539] 20 input/output pins. All of them can be used for digital input/output. [/quote]

Thanks for your answer. Very nice to know that.

I'm so glad you liked it. And please explain why you are not some spam-bot.