We claim that $\dim(Z)=[\dim(U)-\dim(W)]\cdot\dim(V)$.
Let $\{u_1,u_2,\ldots,u_k\}$ be the basis for $W$,
$\{u_1,u_2,\ldots,u_k,u_{k+1},\ldots,u_m\}$ be the extended basis for $U$,
and $\{v_1,v_2,\ldots,v_n\}$ be the basis for $V$. Determine the bases for $L(U,V)$ and for $Z$ as below.
Given $1\leq i\leq m$ and $1\le j\le n$, there exists exactly one linear
map, say $T_{ij}\in L(U,V)$, satisfying (see the Lemma shown below)
$$T_{ij}(u_r)=\delta_{ir}v_j,\quad\forall
1\le r\le m,$$
where $\delta_{ir}$ is the Kronecker delta function. It is easy to see that
(leave it to check)
$\beta=\{T_{ij}:1\le i\le m\mbox{ and }1\le j\le n\}$ is the basis for
$L(U,V)$. Now, given $T\in Z$, we first assume
$T=\displaystyle\sum_{i,\,j}a_{ij}T_{ij}$ for some scalars $a_{ij}$. Since $u_1,u_2,\ldots,u_k\in W$, we have
$${\it 0}=T(u_r)=\sum_{i,\,j}a_{ij}T_{ij}(u_r)=\sum_{i,\,j}a_{ij}\delta_{ir}v_j=\sum_{j=1}^na_{rj}v_j\quad \mbox{for }1\le r\le k.$$ Also, since $\{v_1,v_2,\ldots,v_n\}$ is linearly independent,
$a_{r1}=a_{r2}=\cdots=a_{rn}=0$ for all $1\le r\le k$. Therefore
$$T=\sum_{i,\, j}a_{ij}T_{ij}=\sum_{i=k+1}^m\sum_{j=1}^na_{ij}T_{ij},$$
and thus $\gamma=\{T_{ij}:k+1\le i\le m\mbox{ and }1\le j\le n\}$ generates $Z$. Finally, since $\gamma$ is clearly linearly independent,
we conclude that $\gamma$ is a basis for $Z$. Hence
$$\dim(Z)=(m-k)\cdot n=[\dim(U)-\dim(W)]\cdot\dim(V).$$
Lemma. Let $U$ and $V$ be vector spaces, and suppose that
$\{u_1,u_2,\ldots,u_m\}$ is a basis for $U$. For $v_1,v_2,\ldots,v_m\in V$,
there exists exactly one linear map $T\in L(U,V)$ such that
$T(u_i)=v_i$ for $i=1,2,\ldots,m$.
Proof. Let $x\in U$, then $x=\displaystyle\sum_{i=1}^ma_iu_i$, for some
unique scalars $a_i$. Define $T:U\rightarrow V$ by
$$T(x)=\sum_{i=1}^ma_iv_i.$$
Then it is clear that $T(u_i)=v_i$ for each $i$.
To check $T$ is linear, given $u,u'\in U$ and a scalar $c$, then we may write
$$u=\sum_{i=1}^mb_iu_i\quad\mbox{and}\quad u'=\sum_{i=1}^mb_i'u_i$$
for some scalars $b_i$ and $b_i'$. Thus
$cu+u'=\displaystyle\sum_{i=1}^m(cb_i+b_i')u_i$ and so
$$T(cu+u')=\sum_{i=1}^m(cb_i+b_i')v_i
=c\sum_{i=1}^mb_iv_i+\sum_{i=1}^mb'_iv_i=c\,T(u)+T(u').$$
Hence $T$ is linear. Next, to check $T$ is unique, suppose that there is
another $T'\in L(U,V)$ such that $T'(u_i)=v_i$ for each $i$. Then for
$x\in U$ with $x=\displaystyle\sum_{i=1}^ma_iu_i$, we have
$$T'(x)=\sum_{i=1}^ma_iT'(u_i)=\sum_{i=1}^ma_iv_i
=\sum_{i=1}^ma_iT(u_i)=T(x).$$
Hence $T'=T$.