Let $Ord(m)$ be the number of elements of order $m$ in $\mathbb{Z}_N^a$, where $m|N$. A nice way to compute $Ord(m)$ is to start from the observation
$$\sum_{m|N} Ord(m) = N^a$$
and to apply Möbius inversion:
$$Ord(m) = \sum_{d|m} \mu(m/d)d^a.$$
$Ord(m)$ is multiplicative (if $m$ and $n$ are relatively prime, then $Ord(mn) = Ord(m)Ord(n)$; cf. Chinese remainder theorem). Thus, it is not hard to work out $Ord(m)$ in terms of how $\mu$ behaves on the prime-power factors of $m$. After a little algebra,
$$Ord(m) = m^a \prod_{\text{prime } p|m} (1-\frac1{p^a}).$$
Notice that $N$ has receded from the picture. Indeed, for $m|N$, let
$$\mathbb{Z}_m^a \hookrightarrow \mathbb{Z}_N^a$$
be the obvious inclusion of abelian groups, mapping onto the subgroup of elements whose order divides $m$. Then the set of elements of order exactly $m$ in $\mathbb{Z}_m^a$ maps onto the set of elements of order exactly $m$ in $\mathbb{Z}_N^a$, so we are just counting the former set.
Edit: Oh wait, I didn't quite answer your exact question, did I? But no problem: the number of $x$ such that $(N/m)x$ has order exactly $m$ is just the inverse image of the set of order $m$ elements w.r.t. the map
$$(N/m) \cdot -: \mathbb{Z}_N^a \to \mathbb{Z}_N^a.$$
This map has kernel of size $(N/m)^a$, and the inverse image we want consists of $Ord(m)$ many distinct cosets of this kernel. Thus, the answer to the actual question is
$$N^a \prod_{\text{prime } p|m} (1 - \frac1{p^a}).$$