so how many ports are there in total
Since you can't be bothered with simple math:
Up to 8 USB 2.0(4 minimum) and up to 6 USB 3.0 (4 minimum). In order to exceed the minimum, you would need to connect USB panels to the onboard connections to utilize these ports.