N=8 supergravity has exactly the same degree of freedom as N=4 Yang-Mills.
The maximal number of supersymmetry generators possible is 32. Theories with more than 32 supersymmetry generators automatically have massless fields with spin greater than 2. It is not known how to make massless fields with spin greater than two interact, so the maximal number of supersymmetry generators considered is 32. This corresponds to an N = 8 supersymmetry theory. Theories with 32 supersymmetries automatically have a graviton.