Determining the number of walks between two vertices in a graph
The following answer assumes that by walk you mean path. If you really mean walk, then if $v_1$ and $v_2$ are connected, there are always infinitely many walks between $v_1$ and $v_2$. (A path is a walk without repeated vertices.)

Run DFS from $v_1$, and consider the resulting DFS tree. We can assume that $v_2$ appears in the tree, since otherwise there is no path between $v_1$ and $v_2$. There is always one path from $v_1$ to $v_2$, namely along the tree edges. When is this path unique?

Let us show that the path is unique iff there are no back edges whose target is between $v_1$ (inclusive) and $v_2$ (exclusive). (The target of a back edge is the vertex closer to $v_1$.)

Suppose first that there is a back edge from $y$ to $x$. The following is another path from $v_1$ to $v_2$:
$$ v_1 \leadsto x \to y \leadsto v_2, $$
where $\leadsto$ is a path along the tree edges, $x \to y$ is the back edge. (There are really three different cases here: $y$ above $v_2$, below $v_2$, and equal to $v_2$.)

In the other direction, suppose that $p$ is a path from $v_1$ to $v_2$ which is not solely along tree edges. The first edge in $p$ which is not a tree edge must be a back edge. A short case analysis (considering the direction in which the back edge is taken) shows that the target of the back edge must be between $v_1$ (inclusive) and $v_2$ (exclusive).