# How many distinct factors of $n$ are less than $x$?

For some (squarefree) integer $n$ and some integer $x$, I would like to find an expression that gives, for all $n$ and $x$, a good upper bound on the function $$f(n, x) = \sum_{d|n, d < x} 1$$ which counts the number of distinct factors of $n$ that are less than $x$. For example, taking $n = 30$ and $x = 11$, this function has a value of 6: (there are 6 distinct divisors of 30 that are less than 11: 1, 2, 3, 5, 6 and 10). Is there anything related to this in the literature? Any help or suggestions would be appreciated.

One thing I notice: if $p$ is a prime and $p > x$ then $f(np, x) = f(n, x)$ (since no factors of $pn$ less than $x$ have $p$ as a divisor). So only integers $n$ all of whose prime factors are less than $x$ need be considered.