I believe the discrepancy between 40 and actual sum of 48 is mostly an error, however there are many other registers used for handling hardware, memory management, and control of different features of the CPU.
The answer you linked to covers all the commonly used registers in the following image (taken from there):

There are, however plenty of less commonly known registers. Those registers are not likely used by user mode programs but used to control and initialize the processor and low-level constructs the CPU is aware of. They control CPU subsystems such as the MMU unit, task scheduling, etc. Documentation of those registers can be found in the AMD64 Architecture Manual.
You can see most of them in the following figure, taken from the AMD64 Architecture Manual:
Not in the above picture is the new Extended Control Registers family of registers, for which only XCR0
is currently defined.
The System Registers are part of the Model Specific Registers that, as the name implied, are model specific. The variety also changes between CPUs. A full list for the AMD64 architecture can be found in "Appendix A MSR Cross-Reference" of the AMD64 Architecture Manual.
There are extensions that certain AMD64 based CPUs support/implement that extend the set of XMM
registers available. The XMM
(and later YMM
and ZMM
) are currently extended to up to 32 registers of 512 bit each in AVX-512. Similar to general registers, XMM
registers allow access to the lower parts of their YMM
and ZMM
counterparts.
There are additionally what's called "memory mapped registers" which basically means those registers are accessed through memory operations instead of designated instructions. They can be, depending on your definition, countered as registers. One such example is the "APIC Registers" described in section 16.3.2 of the AMD64
There are even internal registers that are not exposed through the instruction set but are used for performance reasons.