Semi-stable \(p\)-adic representations and Griffiths' transversality Bounding the Betti numbers and computing the Euler-Poincaré characteristic of semi-algebraic sets defined by partly quadratic systems of polynomials 