We present a dynamical description of (anti)proton number cumulants and correlation functions in central Au-Au collisions at sNN=7.7–200GeV by utilizing viscous hydrodynamics simulations. The cumulants of proton and baryon number are calculated in a given momentum acceptance analytically, via an appropriately extended Cooper-Frye procedure describing particlization of an interacting hadron resonance gas. The effects of global baryon number conservation are taken into account using a generalized subensemble acceptance method. The experimental data of the STAR Collaboration are consistent at sNN≳20GeV with simultaneous effects of global baryon number conservation and repulsive interactions in the baryon sector, the latter being in line with the behavior of baryon number susceptibilities observed in lattice QCD. The data at lower collision energies show possible indications for sizable attractive interactions among baryons. The data also indicate sizable negative two-particle correlations between antiprotons that are not satisfactorily described by baryon conservation and excluded volume effects. We also discuss differences between cumulants and correlation functions (factorial cumulants) of (anti)proton number distribution, proton versus baryon number fluctuations, and effects of the hadronic afterburner.