Determine all functions $f:\mathbb{R}\rightarrow \mathbb{R}$ such that the set 
\[\left \{   \frac{f(x)}{x}: x \neq 0 \textnormal{ and } x \in \mathbb{R}\right \}\]
is finite, and for all $x \in \mathbb{R}$
\[f(x-1-f(x)) = f(x) - x - 1\]
1. **Given the functional equation:**
   \[
   f(x-1-f(x)) = f(x) - x - 1
   \]
   We start by substituting \( x = y - 1 - f(y) \) into the equation. This gives:
   \[
   f(y - 1 - f(y) - 1 - f(y - 1 - f(y))) = f(y - 1 - f(y)) - (y - 1 - f(y)) - 1
   \]
   Simplifying the left-hand side, we get:
   \[
   f(2y - 2f(y) - 1) = 2f(y) - 2y - 1
   \]

2. **Inductive Step:**
   We now take \( y = 2z - 2f(z) - 1 \) and substitute it into the equation:
   \[
   f(4z - 4f(z) - 1) = 4f(z) - 4z - 1
   \]
   By induction, we can generalize this to:
   \[
   f(2^n(x - f(x)) - 1) = 2^n(f(x) - x) - 1
   \]
   for all real \( x \) and natural number \( n \).

3. **Define a new function \( g(x) \):**
   Let \( g(x) = f(x) - x \). Rewriting the equation in terms of \( g(x) \), we get:
   \[
   g(-2^n g(x) - 1) = 2^{n+1} g(x)
   \]
   for all real \( x \).

4. **Analyzing the set of values:**
   Given that the set 
   \[
   \left\{ \frac{f(x)}{x} : x \neq 0 \text{ and } x \in \mathbb{R} \right\}
   \]
   is finite, we need to show that \( g(x) = 0 \) for all \( x \). Consider:
   \[
   \frac{g(-2^n g(x) - 1)}{-2^n g(x) - 1} = \frac{2^{n+1} g(x)}{-2^n g(x) - 1}
   \]
   Since \( \frac{g(x)}{x} \) has finitely many values for non-zero \( x \), the function 
   \[
   h(n, x) = \frac{2^{n+1} g(x)}{2^n g(x) + 1}
   \]
   must also have finitely many values.

5. **Contradiction and conclusion:**
   Assume \( g(x_0) \neq 0 \) for some real number \( x_0 \). Then:
   \[
   2 - h(n, x_0) = \frac{2}{2^n g(x_0) + 1}
   \]
   cannot take finitely many values since for distinct \( n \) values, \( 2^{n_1} g(x_0) \neq 2^{n_2} g(x_0) \) because \( g(x_0) \neq 0 \). This leads to a contradiction.

   Therefore, the only solution is \( g(x) = 0 \) for all \( x \), which implies:
   \[
   f(x) = x
   \]
   for all real numbers \( x \).

The final answer is \( \boxed{ f(x) = x } \).