The difficulty is that machine may have X amount of USB controllers, capable of Y amount of ports, but have less than Y ports physically presented out of the case.
Some of the usb ports/controllers may be used internally and never presented as a port - in a laptop for example, a webcam is almost always a usb device directly wired to the motherboard usb controller. As is the touchpad.
Pre-built machines may not take advantage of all of the USB risers available on the motherboard. They could be sitting there with nothing connected to them. However, from an OS point of view, it is still a USB port - that it doesn't have a cable running from the riser to a physical port on the case is not something it can be aware of.
So if you want to see which of the USB ports the motherboard supports have physical ports on the case, then without directly looking, I would suggest some sort of webcam setup :)