Generalized Dehn-Sommerville Relations