One of the most remarkable human cognitive abilities is the "sense of number," that is, the almost instantaneous perception of numerosity information in the visual environment. While numerosity perception mirrors primary sensory processing in many aspects, little is known whether and how numerosity perception is influenced by selective attention to numerosity. Here, we investigated the effects of feature-based attention on numerosity perception using the visual search paradigm and the adaptation paradigm, respectively. In the visual search experiment, participants identified the presence of a numerosity-defined outlier among an array of distractors, while in the numerosity adaptation experiment, participants attended to a random dot field whose numerosity either matched or differed from the adaptor. We found a "semiparallel" search pattern in which attention was captured by the numerosity-defined outliers in a time-consuming, rather than an instantaneous manner. Interestingly, reduced numerosity adaptation aftereffects were observed when the attended numerosity matched the numerosity of the adaptor, indicating weakened perceptual representation of numerosity induced by feature-based attention. Our findings show, for the first time, that numerosity serves as a unique unit of nonspatial feature-based attention and that numerosity perception was modulated by feature-based attention via a distinctive mechanism that differed from other primary visual features.