You need to use electron configuration to determine if an element is diamagnetic or paramagnetic.
It's not a matter of odd or even number of electrons it's a matter of paired and unpaired electrons.
When all orbitals have both an up spin and down spin electron then the molecule is NOT MAGNETIC and is termed Diamagnetic. (I remember this because di means two.. and you need two electrons in each orbital for it to be diamagnetic)
Lets do Boron. Boron will have a full 1S subshell, a full 2S subshell, and one electron in the 2P subshell (1S^2,2S^2,2P^1). The electron in the P orbital is unpaired and therefore Boron is actually PARAmagnetic and not diamagnetic.
These problems get tricky because if they turn the molecules into ions then you have to consider their non-ground electron state. For instance, if Boron has a +1 charge. Then it would become Diamagnetic because it would have an electron configuration of (1S^2,2S^2) and both the 1S and 2S subshell would be full --- there is only one orbital per S subshell and therefore in total B+1 would have two full orbitals, a full orbital in the 1S subshell and a full orbital in the 2S subshell. The nomenclature can quickly get confusing and took me a while to mentally compartmentalize everything.
While this doesn't help with paramagnetic and diamagnetic problems I think it's also important to understand how electron configuration and quantum numbers can be related. Shell number is (N) is telling you which period the S&P orbitals fall on the periodic table, the subshell shape is determined by the (l) value and this is really just stating if the subshell is a S,P,D, or F suborbital, , also you need to understand that the (ml) quantum number ranges from (-l to +l) and tells you the orientation of the sub-shell, and lastly the (ms) quantum value can be +1/2 or -1/2 and this tells you if the electron has up spin or down spin.