  We introduce a certain birational invariant of a polarized algebraic variety
and use that to obtain upper bounds for the counting functions of rational
points on algebraic varieties. Using our theorem, we obtain new upper bounds of
Manin type for 28 deformation types of smooth Fano $3$-folds of Picard rank
$\geq 2$ following Mori-Mukai's classification. We also find new upper bounds
for polarized K3 surfaces $S$ of Picard rank $1$ using Bayer-Macr\`i's result
on the nef cone of the Hilbert scheme of two points on $S$.
