For $n \geq 1$, let $S(n)$ denote the set of all integers at most $n$, which can be written as a sum of two perfect squares, and let $s(n) = |S(n)|$.
How fast does $s(n)$ grow as $n \to \infty$?
It is easy to see that $\sqrt{n} \leq s(n)$ for all $n \geq 1$. (This follows from the fact that all perfect squares $\leq n$ are in $S(n)$, together with the fact that for $n \geq 2$, we have $2 \in S(n)$.)
Also, we know that $\lim_{n \to \infty} \frac{s(n)}{n} = 0$. This follows from the fact that the set of all integers which are the sum of two perfect squares $S = \cup_{n=1}^\infty S(n)$ has 0 upper density; in other words, the probability that a "random" positive integer is a sum of two squares is 0. Going back to the first sentence of this paragraph, we have that $s(n)$ grows slower than any linear function.
I presume that to answer the above question, we probably want to use the following well-known characterization due, I think, to Euler (see page 5) of the set of all integers which are the sum of two squares.
Theorem: Let $n \geq 1$. Then $n \in S(n)$ (i.e. $n$ can be written as a sum of two squares) iff for all primes $p$, if $p \equiv 3 \mod 4$, then the exponent of $p$ in the prime factorization of $n$ is even.