Ground state wave function overlap in superconductors and superfluids