Octet expansion

I am tuning some algorithms for electron counting. They work fine for s, p-, and d-block elements, but need some work for p-block compounds.
We are generally happy enough to say that the oxygen in OH2 is 8, the nitrogen in NH3 is 8, and so on. However for compounds of the type:
POCl3
[SO4]2-
[ClO4]-
[PO4]3-
we could regard all or none as 8-electron compounds. According to how one chooses to do it, perchlorate gives a total VE count of 8, or perhaps 14. If we accept PCl5 as 10 (do we?) then perhaps POCl3 is 10 as well.
Discuss

Delicious
Digg
Reddit
Facebook
Google
Yahoo
Technorati
And BeCl2 (BeBr2, BeI2, BeF2) , BCl3, IF7, SF6, IF5.
Of course it gets tricky for the later p-block elements.
I would suggest that in the code that you designate 10e- counts and 8e- counts as acceptable structures, and make a note of it when someone uses the latter p-block. :)
Boron elements would also need to have a 6electron and 8 electron count rules as <chem> said. :)