A Census of Baryons in Galaxy Clusters and Groups