The NBO occupancies are the diagonal elements of the density matrix expressed in the NBO basis set.