Depends on your hardware.
Each USB Hub can have several USB Ports the range is probably between 1 to 4.
Thus 2 USB root hubs could be as many as 8 USB ports.
"On one of my computers with 3 ports I see usb root hub 3.0 in Device Manager two times"
That could be 3 ports on Hub 1, or 1 on Hub 1 and 2 on Hub 2 or vice versa.
Maybe the other hub is on an internal USB header.
Change the Device Manager View to "Devices by connection" may make things a bit clearer, or consult your MOBO manual.
"Is it always one less than how many ports you have?"
No, as mentioned it is the PC/Laptop designers choice as to how many USB Hubs and USB ports are provided by the hardware.
Conventionally USB ports close together on your PC box maybe on 1 hub.