A standard rack unit (1U) is 1.75" in vertical height, the actual number of units available in a 'full height' rack varies but typically 42U to 45U, or even 47U of empty slots are present - though your provider will likely steal away at least one for the patch panel delivering your connection. Rack mounted servers are designed to fit a certain number of these 'U' such as 1U, 2U, 3U, 4U and so on, which indicates the space they will take once fitted in place (a 1/2U is a short form chassis that can theoretically be mounted 2 per '1U' back-to-back).
Then, we get down to what you can put in, which depends on a few factors including rack depth (e.g. a deep server chassis wont fit a shallow depth rack so check that first), floor strength (as relates to max loading), the Maximum Wattage / Power Density of the DC zone your cabinet will be in (in effect the ability to supply power in, and shift the heat out), and specifically the power supply to your cabinet (usually given in Amps / kVA) and the vertical height of each server (its number of 'U').
It seems broadly accepted (by which I mean recommended) by the main cabinet manufacturers / DC fabricators, etc. not to leave blank spaces between servers (fill them with blanks if they appear), as this interferes with your cooling flow (although you do always hear the odd story that suggests otherwise)... which again is related to the Maximum Wattage of the cabinet... and relates to the HVAC arrangement (CACS/HACS/room-based cooling, etc)... a lot of factors to consider... but as a rule of thumb, nobody should expect to get all their available space filled as one limit or another will be reached... (and yes, there are those that double bank servers at 1/2 U, but thats a whole other story....).
In a well made datacentre, on the balance of probabilities, expect to see your available power supply be the limiting factor though...
CR