MATL, 5 bytes
Exact transliteration of my MATLAB answer. Note that input and output are implicit. -2 bytes thanks to Luis Mendo.
3Z% % Typecast: changes input (implicitly taken and converted to double) to uint64 without changing underlying bits B % Convert integer to array of 1s and 0s z % Count nonzero entries