This perfectly reasonable question turns out to be unanswerable, if by answer we mean a number, or even a formula. The best I can offer is this: if we assume that reference librarians primarily provide student academic support, then the library should look for guidance to the University’s undergraduate market niche.
UNC Charlotte is a good example. UNCC is a large, residential public university with a strong research component. Prospective students have limitless options to choose from, and those that choose UNCC are “voting” for a face-to-face educational experience that gives them routine contact with real, live educators. Outsourced or online-only reference would cut against the UNCC brand, hence a staff of expert reference librarians seems obvious. How many? The administrator in me says “more than we’ve got!”