In wireless sensor networks (WSNs), estimation of the true distance between a source and its destination based on the hop counts between them is an important research problem. The basic idea of several hop-count-based distance-estimation algorithms is to seek an analytical/heuristic transformation from the observed destination's hop-count information to an unknown source-to-destination distance (s2d-distance). We observe that the neighbors of a destination can have different hop counts with respect to the same source, and such information can be used to improve the s2d-distance estimation. Based on this observation, we propose a new s2d-distance estimation algorithm termed hop-count-based neighbor partition (HCNP). Unlike many existing methods, the proposed algorithm not only uses the hop-count information of a destination but also exploits the hop-count information of the destination's neighbors to estimate the s2d-distance. We analyze its statistical property and compare it with other s2d-distance estimation algorithms that only use a destination's hop-count information. We also derive an approximation of the lower bound on the minimum node density required for the HCNP algorithm to achieve a prescribed accuracy. To demonstrate the usefulness of the proposed method, we apply the HCNP algorithm in the localization of WSNs. Comparative studies with the state-of-the-art hop-count-based localization methods show that the proposed approach is superior.