I have a set $X$ which is path connected and it have an open cover by sets $U$ and $V$ which are simply connected, I am looking for a reference that shows that $\pi_1(X)$ is the free group with number of generators one less than the number of components of $U \cap V$.
I found this claim at Gamelin's and Green's Introduction to topology textbook, but it's not proved there.
Thanks in advance.
P.S
I am attaching the excerpt from Gamellin's text:

The many base point version of the Seifert-van Kampen Theorem is covered in the book Topology and Groupoids (T&G). For a recent preprint on the result required, see arXiv:1404.0556.
There is discussion of the many base point situation at this mathoverflow question.
Later: To be more specific the result on groupoids given in the preprint is as follows:
Theorem Let
$$\begin{matrix} C & \to & B \\ \downarrow && \downarrow\\ A & \to & G \end{matrix} $$
be a pushout of groupoids. We assume $C$ is totally disconnected, that $i:C \to A,j:C \to B$ are the identity on objects, and that $G$ is connected. Then $G$ contains as a retract a free groupoid $F$ of rank $$k=n_C-n_A-n_B+1,$$ where $n_P$ is the number of components of the groupoid $P$ for $P=A,B,C$.
Further, if $C$ contains distinct objects $a,b$ such that $A(ia,ib),B(ja,jb)$ are nonempty, then $F$ has rank at least $1$.
(By the rank of a connected free groupoid we mean the rank of any of its vertex groups.)
January 23, 2017 To deal with more than two open sets and with many base points you need the main result of this paper (1984) which gives a generalisation to many base points of a result in Hatcher's book. It is also useful to have the notion of free groupoid, which is dealt with in Higgins' downloadable (1971) book Categories and Groupoids as well as in T&G.
See this mathoverflow question for a comment of Grothendieck on using many base points.