Joint anisotropy and source count constraints on the contribution of blazars to the diffuse gamma-ray background