Validate shared electrons count, take into account existing bonds

[#56880056]