We prove new bounds on the Betti numbers of real varieties and semi-algebraic sets that have a more refined dependence on the degrees of the polynomials defining them than results known before. Our method also unifies several different types of results under a single framework, such as bounds depending on the total degrees, on multi-degrees, as well as in the case of quadratic and partially quadratic polynomials. The bounds we present in the case of partially quadratic polynomials offer a significant improvement over what was previously known. We give several applications of our results, including a generalization of the polynomial partitioning theorem due to Guth and Katz, which has become a very important tool in discrete geometry in the multi-degree setting, and give an application of this result a theorem that interpolates between two different kinds of partitions of the plane. Finally, we extend a result of Barone and Basu on bounding the number of connected components of real varieties defined by two polynomials of differing degrees to the sum of all Betti numbers, thus making progress on an open problem posed in that paper.