Every socket type only works with CPUs that have a specific number of pins. Intel CPUs don't actually have pins - instead, the motherboards that support Intel CPUs have the pins instead, and the CPU has "pads" that connect with each pin on the motherboard. You can tell how many pins there are in a LGAxxxx socket based on the number, as the poster above me already pointed out. The number following "LGA" is always the number of pins in the socket.
I'm less familiar with AMD, but AMD CPUs still have the pins on the CPU itself. The AM3 socket CPUs have 941 pins, the AM3+ socket CPUs have 942 pins. That's about all I know.