As Will Jagy explained, $h(-D)$ is roughly $\sqrt{D}$, given by Dirichlet's class number formula $$h(d) = \frac{w \sqrt{d}}{2 \pi} L(1, \chi_d)$$ where $L(1, \chi_d)$ is the L-function associated to the quadratic character of $\mathbb{Q}(\sqrt{-D})$. Upper bounds for $L(1, \chi_d)$ are easy to prove; I believe you can get $\log(d)$ by partial summation, implying the bound $h(-d) \ll d^{1/2} \log(d)$. Effective lower bounds are notoriously more difficult.
I am fairly sure that the function $f(d)$ you describe is not known to be surjective, although it is widely expected to be; class numbers are fairly difficult to get a handle on, although a variety of divisibility results are known. However I am not entirely sure of this!
As Will Jagy explained, $h(-D)$ is roughly $\sqrt{D}$, given by Dirichlet's class number formula $$h(d) = \frac{w \sqrt{d}}{2 \pi} L(1, \chi_d)$$ where $L(1, \chi_d)$ is the L-function associated to the quadratic character of $\mathbb{Q}(\sqrt{-D})$. Upper bounds for $L(1, \chi_d)$ are easy to prove; I believe you can get $\log(d)$ by partial summation, implying the bound $h(-d) \ll d^{1/2} \log(d)$. Effective lower bounds are notoriously more difficult.
I am fairly sure that the function $f(d)$ you describe is not known to be surjective, although it is widely expected to be; class numbers are fairly difficult to get a handle on, although a variety of divisibility results are known. However I am not entirely sure of this!