Do the dmidecode
command but specify which type to use, like this:
$ sudo dmidecode -t memory | grep Size
This is the output from my system, I have a total of four channels and atm using two.
Size: 4096 MB
Size: No Module Installed
Size: 4096 MB
Size: No Module Installed