As others have said -- ignoring misconfigurations, bugs, errors states and so on -- a router needs to be on multiple networks and so most naturally has multiple IP addresses.
But there are a couple of special cases
Special case 1: Unnumbered Interfaces
There are certain kinds of networks, most notably point-to-point links and virtual private networks links, which don't need addresses and are sometimes used unnumbered. The router has routes which specify exit interfaces rather than the usual next-hop IP address; as the exit interface is point-to-point, the next router is implicit.
A router which connected lots of unnumbered point-to-point links might conceivably therefore have no IP addresses at all, and still be useful.
Consider it a theoretical case only: no one would do it in real life because you'd want to have at least an IP address to connect to for configuration purposes. And many network engineers prefer to number all the interfaces even if not strictly required, as it can help with monitoring and fault finding.
Special case 2: Next Router on Same Subnet
Directly answering your question (as an elaboration of Zac's "stub router" answer)
why can't R1 have only one IP address, similar to the computer?
You certainly can have the following:
internet
|
R2
|.1 192.168.1/24
===+===+===+===============
|.2 |.128
R1 PC
With R2 default route upwards, R1 default route to .1, PC default route to .2
- Yes it works but it's considered inefficient
- Outgoing packets go PC -> R1 -> R2 -> onwards
- R1 also sends ICMP Redirect message to PC
- Incoming packets go Outside -> R2 -> PC
R1 thinks it's silly to get a packet which could have and "should have" gone directly to R2, so tells PC with an ICMP redirect; which the PC can ignore or use at it pleases.
You can switch off the ICMP Redirect messages on most routers, but many network engineers consider them useful as they usually show a misconfiguration.
Special case 3: Black hole
One of the special interfaces a router can have is a "null" interface, which just throws away its packets. Normally this is used as a place to send packets which have been judged to be improper in some way, such as packets with an internal source address arriving on an external interface.
A null interface doesn't have an address. So a router which was configured just to accept packets and throw them away might have just a single IP address (or none if it is on the end of a point-to-point link), and send everything to the null interface. You might do this for logging purposes; also, it can sometimes be more convenient to propagate routes to bad addresses rather than access lists.
Search for "black hole routing" to find out about this technique.