Run dmidecode
. The "Interleaved Data Depth" gives the number of channels.
Dual-channel memory has an interleaved depth of 2.
Handle 0x0041, DMI type 20, 35 bytes
Memory Device Mapped Address
Starting Address: 0x00000000000
Ending Address: 0x001FFFFFFFF
Range Size: 8 GB
Physical Device Handle: 0x0040
Memory Array Mapped Address Handle: 0x0049
Partition Row Position: Unknown
Interleave Position: 1
Interleaved Data Depth: 2