A single-beam spin-exchange relaxation-free (SERF) atomic magnetometer can extract vector magnetic field information by detecting the transmission intensity of a resonant circularly polarized pumping beam, which depends sensitively on the atomic density of the alkali metal. We present a novel scheme to determine atomic density based on zero-field magnetic resonance. The resonance linewidth under different transverse DC magnetic fields is fitted by means of a quadratic function. The atomic density can be extracted from the quadratic coefficients of the fitted function. The experimental results indicate that the deviation of measured density is less than two times compared with the theoretical values between 378 K and 403 K. Furthermore, the influence of modulation field on resonance linewidth is investigated experimentally and theoretically. A miniature single-beam SERF atomic magnetometer with a sensor head volume of only 16.2 cm3 and the measuring sensitivity of 40 fT/ Hz1/2 has been achieved. These results should be beneficial for guiding the development of a chip-scale atomic magnetometer with high sensitivity and spatial resolution for bio-magnetic field imaging applications.