Second Betti Number of a 3-fold Suppose we blow-up $\mathbb{CP}^{3}$ in a planar nodal cubic curve. Then, we obtain a $3$-fold with a single singularity, and then blow-up this singularity. The result is a smooth 3-fold. What is $b_{2}$ of this $3$-fold?
 A: Let $C$ be the curve with node at $P$. Let $X' \to \mathbb{P}^3$ be the blowup of $C$. Let $P' \in X'$ be the singular point. Let $X \to X'$ be the blowup of $P'$.
The exceptional divisor of $X \to \mathbb{P}^3$ has two irreducible components, hence
$$
\operatorname{rank} \mathrm{Cl}(X/\mathbb{P}^3) = 2.
$$
Since $X$ is smooth, $\mathrm{Cl}(X) = \mathrm{Pic}(X)$, hence $b_2(X) = 3$.
Let me also give the following alternative argument.
Let $Y' \to \mathbb{P}^3$ be the blowup of $P$. Let $C' \subset Y'$ be the strict transform of $C$. Let $Y \to Y'$ be the blowup of $C'$.
Then $X$ and $Y$ are two smooth threefolds. Moreover, they come with a birational isomorphism 
$$
\phi \colon X \dashrightarrow Y
$$
(obtained as the composition of $X \to \mathbb{P}^3$ and the inverse of $Y \to \mathbb{P}^3$). The crucial observation is that $\phi$ is an isomorphism in codimension 1. In fact, it is an Atiyah flop.
Indeed, let $L' \subset X'$ be the fiber over $P$ and let $L \subset X$ be its strict transform. On the other hand, let $\Pi \subset Y'$ be the exceptional divisor. It is isomorphic to $\mathbb{P}^2$, and the curve $C'$ intersects it in two different points. Let $M' \subset \Pi$ be the line through this two points, and let $M \subset Y$ be its strict transform. Then $\phi$ is a flop in $L$, and $\phi^{-1}$ is a flop in $M$. 
In particular, $\phi$ induces an isomorphism
$$
X \setminus L \cong Y \setminus M.
$$
Therefore, $b_2(X) = b_2(Y) = 3$.
A: Sasha already wrote a nice solution, but let me give a topological solution.
The singular threefold $X$ has an ordinary node over the singular point of the curve and its blowup $\tilde{X}\to X$ replaces the node by a nondegenerate quadric surface. Let's compute $b_2$ of them one by one. 
To compute $b_2(X)$, one can produce a family of smooth threefolds degenerates into $X$. Explicitly, let $\Delta$ be a disk and consider the constant family $W=\mathbb P^3\times \Delta\to \Delta$. Consider a $\Delta$-family of smooth cubic curve $\{C_t\}$degenerate into the nodal curve $C_0$, which forms a surface $S$ in the total space $W$. Blowup $S$ in $W$ and we get the family 
$$\tilde{W}\to \Delta$$
with general fiber $X_t$ isomorphic to blowup of smooth cubic curve $Bl_{C_t}\mathbb P^3$ and special fiber $X_0\cong X$.
This is a Lefschetz family and it is well known that $X_0$ has homotopy type adding a cone to the vanishing 3-sphere $S^3$ in $X_t$. (See Voisin's Hodge Theory and Complex Algebraic Geometry, vol II, Chapter 2.) Therefore 
$$b_k(X_0)=\begin{cases}
b_k(X_t),\ \ \ \ \ \ \ \ k\neq 3\\
b_k(X_t)-1,\ k=3.
\end{cases}$$
It follows that $b_2(X)=b_2(X_0)=b_2(X_t)=2$ generated by (proper transform) of a line disjoint from $C_t$ and a fiber over $C_t$.
Next, let's look at the quadric transform 
$$\tilde{X}\to X$$
which replace the node by a smooth quadric surface $Q$ as the exceptional divisor, we know $H_2(Q)$ has rank $2$ generated by the two rulings $L_1,L_2$. The fact is that the image 
$$H_2(Q)\to H_2(\tilde{X})$$
has rank one and sends the class $[L_1]-[L_2]$ to zero (It has the same effect as Lefschetz hyperplane theorem, though different situation.) Actually, there is a topological $3$-cycle $\gamma_t$ lives in nearby $X_t$ whose limit in $\tilde{X}$ is a $3$-chain $\gamma_0$ with $\partial \gamma_0=L_1-L_2$. Griffiths deal with this explicitly in his 1969 paper On the Periods of Certain Rational Integrals, II, see statement (15.11) and p.521 for detailed discussion.
So $b_2(\tilde{X})=3$ with two generators from $H_2(X_0)$ and one from a ruling on quadric surface $Q$.
