Based on a large sample of massive ($M_{*}geq 10^{10} M_{odot}$) compact galaxies at $1.0 < z < 3.0$ in five 3D-HST/CANDELS fields, we quantify the fractional abundance and comoving number density of massive compact galaxies as a function of redshift. The samples of compact quiescent galaxies (cQGs) and compact star-forming galaxies (cSFGs) are constructed by various selection criteria of compact galaxies in literatures, and the effect of compactness definition on abundance estimate is proved to be remarkable, particularly for the cQGs and cSFGs at high redshifts. Regardless of the compactness criteria adopted, their overall redshift evolutions of fractional abundance and number density are found to be rather similar. Large samples of the cQGs exhibit a sustaining increase in number density from $z sim 3$ to 2 and a plateau at $1<z<2$. For massive cSFGs, a plateau in the number density at $2<z<3$ can be found, as well as a continuous drop from $z sim 2$ to 1. The evolutionary trends of the cQG and cSFG abundances support the scenario that the cSFGs at $z geq 2$ may have been rapidly quenched into quiescent phase via violent dissipational processes such as major merger and disk instabilities. Rarity of the cSFGs at lower redshifts ($z < 1$) can be interpreted by the decrease of gas reservoirs in dark matter halos and the consequent low efficiency of gas-rich dissipation.