There are some papers of van Luijk, where he computes the ranks of some K3s over number fields. The trick is to note that $NS(X) \hookrightarrow NS(X_p)$, where $X_p$ is the reduction of $X$ modulo a prime ideal $p$. One can determine the rank of $NS(X_p)$ by counting eigenvalues of Frobenius which differ from $q$ (the size of the residue field) by a root of unity. If you want to find rank 1 K3s, you can reduce modulo two different primes and hope to find rank 2 reductions which have lattices which are incompatible in some sense, forcing $NS(X)$ to be rank 1. (The issue here is that the rank of $NS(X_p)$ will always be even, so you can't win by using a single prime.)
I'm not sure how this works when you want to find K3s of larger rank though, unless you had a way of exhibiting linearly independent divisor classes. Anyhow, van Luijk uses this technique to find rank 1 quartics in $\mathbb{P}^3$ and I think others have done the same with genus 2 K3s defined over $\mathbb{Q}$.
I should add that the situation is much easier for Kummer surfaces. If I'm not mistaken, the rank of $X = K(A)$ ($A$ is an abelian surface) is 16 plus the Picard rank of $A$. The 16 comes from the 16 exceptional divisors you get when you blow up $A$ at its 2-torsion points. The rank of $A$ is usually not hard to figure out: a generic $A$ has rank 1, if $A$ is a product of elliptic curves then its rank is 2,3 or 4 depending on whether the curves are isogenous and whether they have CM or not, and there are a few other cases which one can probably figure out...