Generalized electron counting in determination of metal-induced reconstruction of compound semiconductor surfaces