Let $f(x)=|2\{x\} -1|$ where $\{x\}$ denotes the fractional part of $x$. The number $n$ is the smallest positive integer such that the equation $$nf(xf(x)) = x$$ has at least $2012$ real solutions $x$. What is $n$?

$\textbf{Note:}$ the fractional part of $x$ is a real number $y= \{x\}$, such that $ 0 \le y < 1$ and $x-y$ is an integer. 

$ \textbf{(A)}\ 30\qquad\textbf{(B)}\ 31\qquad\textbf{(C)}\ 32\qquad\textbf{(D)}\ 62\qquad\textbf{(E)}\ 64 $
1. **Understanding the function \( f(x) \):**
   The function \( f(x) = |2\{x\} - 1| \) where \(\{x\}\) denotes the fractional part of \( x \). The fractional part \(\{x\}\) is defined as \( x - \lfloor x \rfloor \), where \(\lfloor x \rfloor\) is the greatest integer less than or equal to \( x \). Therefore, \( 0 \leq \{x\} < 1 \).

2. **Behavior of \( f(x) \):**
   Since \(\{x\}\) ranges from 0 to 1, we can analyze \( f(x) \) over this interval:
   \[
   f(x) = |2\{x\} - 1|
   \]
   - For \( 0 \leq \{x\} < 0.5 \), \( 2\{x\} \) ranges from 0 to 1, so \( |2\{x\} - 1| = 1 - 2\{x\} \).
   - For \( 0.5 \leq \{x\} < 1 \), \( 2\{x\} \) ranges from 1 to 2, so \( |2\{x\} - 1| = 2\{x\} - 1 \).

   Therefore, \( f(x) \) is a piecewise linear function that oscillates between 0 and 1.

3. **Analyzing the equation \( nf(xf(x)) = x \):**
   We need to find the smallest positive integer \( n \) such that the equation \( nf(xf(x)) = x \) has at least 2012 real solutions \( x \).

4. **Behavior of \( f(xf(x)) \):**
   Since \( f(x) \) oscillates between 0 and 1, \( xf(x) \) will also oscillate between 0 and \( x \). Therefore, \( f(xf(x)) \) will oscillate between 0 and 1.

5. **Counting the solutions:**
   To find the number of solutions to \( nf(xf(x)) = x \), we need to count the number of times the function \( f(xf(x)) \) intersects the line \( x/n \).

6. **Oscillations of \( f(xf(x)) \):**
   The function \( f(xf(x)) \) oscillates 2 times for each interval of length 1. Therefore, over the interval \([0, n]\), \( f(xf(x)) \) oscillates \( 2n \) times.

7. **Finding \( n \):**
   We need at least 2012 solutions, so we set up the inequality:
   \[
   2n \geq 2012
   \]
   Solving for \( n \):
   \[
   n \geq \frac{2012}{2} = 1006
   \]

8. **Verification:**
   We need to verify that \( n = 1006 \) is indeed the smallest integer that satisfies the condition. Since \( 2 \times 1006 = 2012 \), \( n = 1006 \) is the smallest integer that ensures at least 2012 solutions.

The final answer is \( \boxed{32} \)