Struggling to answer this question from Lickorish's introduction to Knot Theory.
If M has a 3-manifold with a genus g Heegaard splitting, then the fundamental group of M has a presentation with g generators and g relators
I know that since the Heegaard splitting exists, then $M=X\cup Y$ for a pair of handlebodies X and Y, both of genus g, and that by Van-Kampen's Theorem, $$\pi_{1}(M)=\pi_{1}(X)_{*\pi_{1}(X\cap Y)}\pi_{1}(Y)$$ but I'm struggling to show that this shows that the fundamental group of M has a presentation with g generators and g relators.
Any help?