Nix comes with its own glibc, so that's 3, although I guess while it is not the default you could compile statically.
For example pgbouncer[1] can be linked with different DNS resolvers, which have their strengths and weaknesses (currently it is linked with c-ares which probably is what most people want, but until version 1.10 that wasn't true) you can override the derivation and use different dependency. Nix will build on the fly the new version that does do what you want, and this is awesome.
I don't think you can make syscalls without embedding assembly into your C code.