Write $$f(z) = \frac{1}{z} + \frac{e^{iz}-1}{z}$$
The integral of $1/z$ of the half-circle is $-\pi i $ by direct computation. The second term has a removable singularity at $0$:
$$\frac{e^{iz}-1}{z} \to i ,\quad z\to 0$$
Hence, it is bounded in a neighborhood of $0$. Say,
$$\left|\frac{e^{iz}-1}{z}\right|\le M \quad \text{when } |z|<r_0$$
Integrating this over a half-circle of radius $r$ gives at most $M\pi r$, which tends to zero as $r\to0$.
Since the problem is a special case, the answer is given in Figure without any integration.
If the curve (semicircle) lies to the positive $x$ as in above Figure, then
$$
\int_{C+} \mathbf{v}\circ d\mathbf{r}=\int_{C+}\| \mathbf{v}\|ds=\int_{C+}2\cdot ds=2\int_{C+}ds=2\cdot\left(\pi \rm R \right)=+4\pi
\tag{01}
$$
while if lies to the negative $x$, then
$$
\int_{C-} \mathbf{v}\circ d\mathbf{r}=\int_{C-}\left[-\| \mathbf{v}\| \right]ds=-\int_{C+}2\cdot ds=-2\int_{C-}ds=2\cdot\left(\pi \rm R \right)=-4\pi
\tag{02}
$$
(01). Case $C_{\boldsymbol{+}}$ :
A parametrization of the curve $C_{\boldsymbol{+}}$ in the right half-plane, as in Figure, from positive $y$ to negative $y$ would be :
$$
\mathbf{r}=2\:\left(\sin t,\cos t\right), \quad t \in \left[0,\pi\right]
\tag{01-a}
$$
so
\begin{align}
\mathbf{v} & = 2\:\left(\cos t,-\sin t\right)
\tag{01-b}\\
d\mathbf{r} & =2\:\left(\cos t,-\sin t\right)dt
\tag{01-c}\\
\mathbf{v} \boldsymbol{\cdot} d\mathbf{r} & = 4\:\left(\cos t,-\sin t\right) \boldsymbol{\cdot}\left(\cos t,-\sin t\right)dt =\:\boldsymbol{+}\:4\:dt
\tag{01-d}\\
{\rm I} &=\int_{C_{\boldsymbol{+}}}\mathbf{v} \boldsymbol{\cdot} d\mathbf{r} =\:\boldsymbol{+}\:4\:\int_{0}^{\pi}dt =\:\boldsymbol{+}\:4\:\pi
\tag{01-e}
\end{align}
(02). Case $C_{\boldsymbol{-}}$ :
A parametrization of the curve $C_{\boldsymbol{-}}$ in the left half-plane from positive $y$ to negative $y$ would be :
$$
\mathbf{r}=2\:\left(\cos t,\sin t\right), \quad t \in \left[\pi/2,3\pi/2\right]
\tag{02-a}
$$
so
\begin{align}
\mathbf{v} & = 2\:\left(\sin t,-\cos t\right)
\tag{02-b}\\
d\mathbf{r} & =2\:\left(-\sin t,\cos t\right)dt
\tag{02-c}\\
\mathbf{v} \boldsymbol{\cdot} d\mathbf{r} & = 4\:\left(\sin t,-\cos t\right) \boldsymbol{\cdot}\left(-\sin t,\cos t\right)dt =\:\boldsymbol{-}\:4\:dt
\tag{02-d}\\
{\rm I} &=\int_{C_{\boldsymbol{-}}}\mathbf{v} \boldsymbol{\cdot} d\mathbf{r} =\:\boldsymbol{-}\:4\:\int_{\pi/2}^{3\pi/2}dt =\:\boldsymbol{-}\:4\:\pi
\tag{02-e}
\end{align}
Best Answer
"Traversed counter clockwise" means we go in the opposite direction to the direction followed by the hands of an analogue clock. That is, we go from 9 o'clock to 8 o'clock...to 4 o'clock to 3 o'clock.
Suppose we want walk along such a circle according to the rule that our position must at all times $t$ be $(\cos t,\sin t)$. If we start when $t=\pi$, we start at the position with coordinates $(\cos \pi,\sin \pi)=(-1,0)$. When $t$ has changed to $t=3\pi/2=\pi+\pi/2$, we have changed our position to $(\cos 3\pi/2,\sin 3\pi/2)=(0,-1)$. When $t=2\pi$, we are at $(\cos 2\pi,\sin 2\pi)=(1,0)$, etc. Thus as $t$ changes from $\pi$ to $2\pi$, our position on the circle changes accordingly.