Given an integer $n\ge 2$, a function $f:\mathbb{Z}\rightarrow \{1,2,\ldots,n\}$ is called [i]good[/i], if for any integer $k,1\le k\le n-1$ there exists an integer $j(k)$ such that for every integer $m$ we have 
\[f(m+j(k))\equiv f(m+k)-f(m) \pmod{n+1}. \]
Find the number of [i]good[/i] functions.
Given an integer \( n \ge 2 \), a function \( f: \mathbb{Z} \rightarrow \{1, 2, \ldots, n\} \) is called *good* if for any integer \( k \), \( 1 \le k \le n-1 \), there exists an integer \( j(k) \) such that for every integer \( m \) we have 
\[ f(m + j(k)) \equiv f(m + k) - f(m) \pmod{n+1}. \]
We need to find the number of *good* functions.

1. **Step 1: \( f \) is a surjective function and has a (minimum) period \( n \).**

   **Proof:**
   Let \( m \in \mathbb{Z} \) be any integer and assume there exists \( k \) such that \( 1 \leq k \leq n-1 \) and \( f(m+k) = f(m) \). Then 
   \[ f(m + j(k)) \equiv f(m + k) - f(m) \equiv 0 \pmod{n+1}. \]
   This is a contradiction since \( f(\mathbb{Z}) \subseteq \{1, 2, \ldots, n\} \). Thus, \( f(m), f(m+1), \ldots, f(m+n-1) \) are all distinct and 
   \[ \{f(m), f(m+1), \ldots, f(m+n-1)\} = \{1, 2, \ldots, n\}. \]
   So \( f \) is surjective. Similarly, replacing \( m \) with \( m+1 \), we get 
   \[ \{f(m+1), f(m+2), \ldots, f(m+n)\} = \{1, 2, \ldots, n\} \implies f(n+m) = f(m). \]
   Since \( f \) has period \( n \), we can assume \( 0 \leq j(k) \leq n-1 \) for any \( 1 \leq k \leq n-1 \).

2. **Step 2: \( j(u) \neq j(v) \) for any \( 1 \leq u < v \leq n-1 \).**

   **Proof:**
   Assume there exist \( 1 \leq u < v \leq n-1 \) such that \( j(u) = j(v) \). Then
   \[ f(m+u) - f(m) \equiv f(m + j(u)) \equiv f(m + j(v)) \equiv f(m+v) - f(m) \pmod{n+1} \]
   \[ \implies f(m+u) \equiv f(m+v) \pmod{n+1} \]
   \[ \implies f(m+u) = f(m+v). \]
   This is a contradiction since \( 1 \leq v-u \leq n-2 \).

3. **Step 3: For any \( 1 \leq k \leq n-1 \), there exists \( l_k \in \mathbb{N} \) such that \( j^{l_k}(k) = 0 \), where \( j^l(k) \) means \( l \) times iteration.**

   **Proof:**
   Suppose there exists \( 1 \leq k \leq n-1 \) such that \( j^l(k) \neq 0 \) for any \( l \in \mathbb{N} \). Then easy calculation yields
   \[ f(m + j^l(k)) \equiv f(m + k) - lf(m) \pmod{n+1}. \]
   Since \( \{j(k), j^2(k), \ldots, j^n(k)\} \subseteq \{1, 2, \ldots, n-1\} \), there exist \( 1 \leq u < v \leq n \) such that \( j^u(k) = j^v(k) \). Then
   \[ f(m + k) - uf(m) \equiv f(m + j^u(k)) \equiv f(m + j^v(k)) \equiv f(m + k) - vf(m) \pmod{n+1} \]
   Thus,
   \[ (n+1) \mid (v-u)f(m) \]
   for any \( m \in \mathbb{Z} \). But this is a contradiction since \( 1 \leq v-u \leq n-1 \) and there is \( m \) with \( f(m) = 1 \).

4. **Step 4: There exists such \( f \) iff \( n+1 \) is a prime number.**

   **Proof:**
   We know that for each \( 1 \leq k \leq n-1 \) there exists (minimum) \( l_k \in \mathbb{N} \) such that \( j^{l_k}(k) = 0 \). Now we have
   \[ f(m + j^l(k)) \equiv f(m + k) - lf(m) \pmod{n+1} \]
   for \( 1 \leq l \leq l_k \). Thus,
   \[ f(m) = f(m + j^{l_k}(k)) \equiv f(m + k) - l_k f(m) \implies (l_k + 1) f(m) \equiv f(m + k). \]
   So,
   \[ (l_k + 1)^n f(m) \equiv (l_k + 1)^{n-1} f(m + k) \equiv \ldots \equiv f(m + nk) \equiv f(m) \pmod{n+1}. \]
   That's
   \[ (l_k + 1)^n \equiv 1 \pmod{n+1} \text{ for any } 1 \leq k \leq n-1. \]
   Obviously, \( 1 \leq l_k \leq n \) and for \( u \neq v \), \( l_u \neq l_v \). (If \( l_u = l_v \), then \( f(m+u) \equiv (l_u+1)f(m) \equiv (l_v+1)f(m) \equiv f(m+v) \pmod{n+1} \) and so \( u = v \).) Moreover, \( l_k \neq n \) since for \( l_k = n \) we would have \( f(m+k) \equiv (l_k+1)f(m) \equiv 0 \pmod{n+1} \). Contradiction! Thus,
   \[ \{l_1, l_2, \ldots, l_{n-1}\} = \{1, 2, \ldots, n-1\} \]
   and so
   \[ (l_k + 1)^n \equiv 1 \pmod{n+1} \text{ for any } 1 \leq k \leq n-1 \implies n+1 \text{ is prime.} \]

5. **Step 5: If \( n+1 \) is prime, then there are \( n \cdot \phi(n) \) functions \( f \) satisfying the problem.**

   **Proof:**
   From Step 4, there is (minimum) \( 1 \leq l \leq n \) such that \( j^l(1) = 0 \). Also,
   \[ f(m+1) \equiv (l+1)f(m) \pmod{n+1} \]
   for any \( m \in \mathbb{Z} \). So,
   \[ f(m) \equiv (l+1)^m f(0). \]
   Since \( f \) is surjective, \( l+1 \) must be a primitive root \( g \) modulo \( n+1 = p \). Thus, any function \( f \) is of the form
   \[ f(m) \equiv g^m f(0) \pmod{n+1}. \]
   Moreover, any such function obeys the functional equation with \( j(k) = \text{ind}(g^k - 1) \) (since \( 1 \leq k \leq n-1 \), \( g^k \neq 0 \) and so this index exists). Since there are \( \phi(p-1) = \phi(n) \) ways to choose \( g \) and \( n \) ways to choose \( f(0) \in \{1, 2, \ldots, n\} \), there are \( n \cdot \phi(n) \) functions with the desired property.

The final answer is \( \boxed{ n \cdot \phi(n) } \).