I have found that different cities have different regulations and I have been in places where 4 persons can travel in any cab (3 in back seat, one in front seat) while other cities don't allow front seat for passengers. Of course there are bigger taxis, but I mean in case I don't find one and just get common cabs (1+3 passengers).
All licenced UK taxis have a plate on the rear of the vehicle indicating how many passengers they allow. Usually, it's fairly obvious from looking inside the cab, but a quick look at the rear will tell you. In the image below, it shows "Licensed to Carry 5 Persons."
Any cab that doesn't have a plate like this on the back can be considered unlicensed. In London, there are people who drive around in their own cars looking for fares -they don't care how many people they carry, and they're not insured for this work.
There are two cases. To legally flag down a cab in London, it should be a standard taxi, and therefore seat at least 5, as described in a prior answer.
It is often cheaper to use some form of "private hire" service. They are only allowed to pick up passengers by prior arrangement. As noted in comments on the question, when you contact the service to arrange a ride you can tell them how many passengers, and they should send a suitable vehicle.