The function counts the NAs in a vector and returns the number of NAs and the "new" vector.
References
C. Reimann, P. Filzmoser, R.G. Garrett, and R. Dutter: Statistical Data Analysis
Explained. Applied Environmental Statistics with R. John Wiley and Sons, Chichester, 2008.