Is keeping a single rat ok?
Rats are highly social animals. They need a social structure for health and happiness. Rats crave the interaction and stimulation that only other rats can provide. It just isn't natural for them to live alone. Rats play, groom each other, and cuddle up to sleep together. They also talk in ratty ways through smell, and at sound frequencies humans can't hear. No matter how much time and care you give a single rat you won't be able to replace that. Not to mention that rats are at their most active and ready for games in the middle of the night. Keeping a rat alone is the same as sentencing a human to life imprisonment in solitary confinement. Rats are too intelligent and sophisticated to be left to their own company.
Life as a single rat
Although rats will usually survive if kept alone, rats living by themselves are at risk of psychological and physical health problems. For example stress caused by loneliness can cause Mycoplasma to flare up. Single rats will have much shorter lives. So if cost is a factor causing you to think about having a single rat, then consider how much extra you might have to spend in vets bills. Two rats will almost certainly be cheaper!
Won't a single rat bond better with me?
No. A single rat could in fact lose his/her confidence and become overly shy, hiding away from you and the rest of the world. Rats in a group will be happier and more than ready to bond with their human when they get some attention.
So what's the optimum group size?
A single sex pair will be happy, but rats will also be content in single sex groups of three to five. A bigger group will obviously have more relationships, more of a hierarchy and more complex interactions. Don't put un-neutered male and female rats together unless you want lots of baby rats. Also males housed in close proximity to females may be more quarrelsome towards each other. Obviously the number of rats you can care for depends on the size of the cage you have. A cage big enough for one rat is big enough for two. But more rats will require more space. Some advice on housing is here. In the wild, rats live in very large colonies, although that isn't recommended for pet rats.