Try the below code.
Select SUM(Total)
From
(Select count(distinct u.loginid) as Total
from undergradstudents u
UNION ALL
Select count (distinct f.loginid) as Total
From Faculty f
UNION ALL
Select count (distinct g.loginid) as Total
From Gradstudents g) Tot