Endmember extraction is a crucial step in hyperspectral unmixing. For many endmember extraction algorithms, the number of endmembers is a precondition, and the accuracy of the endmember number directly affects the quality of the unmixing results. This paper proposes an automatic method for estimating the endmember number for hyperspectral imagery on the basis of vertex component analysis (VCA). The endmember extraction result of VCA is inconsistent because of the involvement of random vectors. This feature is utilized by our method to obtain the real endmember number. First, the endmember number is initialized with a small integer. Then, VCA is repeatedly implemented, and the endmember extraction results are different each time because of VCA’s inconsistency. Finally, the real endmember number is determined from the union of these individual results. Extensive experiments were carried out on both simulated and real hyperspectral images, confirming the effectiveness of the proposed approach.