Updated countNucs to automatically distinguish DNA/RNA and count Ns if present