Count the rack units your kit needs, including the gaps you forgot.
Full-height racks are usually 42U or 47U. Wall cabinets are 6U to 18U.
24U free in a 42U rack
Height is the easy constraint. The two that actually stop installations are depth and weight: short-depth wall cabinets will not take a full-length server no matter how many U are free, and a rack filled with disk shelves can pass what the floor is rated for. Check the door-to-door depth and the loaded weight before ordering.
What this cannot tell you
Take this with you
Rack Unit (U) Space Planner on RunTheTests — free browser-based sysadmin tools, no sign-up.