How many pairs of integers $(x,y)$ are there such that $2x+5y=xy-1$?

$ 
\textbf{(A)}\ 1
\qquad\textbf{(B)}\ 3
\qquad\textbf{(C)}\ 4
\qquad\textbf{(D)}\ 6
\qquad\textbf{(E)}\ 12
$
1. Start with the given equation:
   \[
   2x + 5y = xy - 1
   \]

2. Rearrange the equation to group all terms on one side:
   \[
   xy - 2x - 5y = 1
   \]

3. Factor by grouping. Notice that we can factor the left-hand side as follows:
   \[
   xy - 2x - 5y + 10 - 10 = 1 \implies (x-5)(y-2) = 11
   \]

4. Now, we need to find all pairs of integers \((x, y)\) such that \((x-5)(y-2) = 11\). The integer factor pairs of 11 are:
   \[
   (1, 11), (-1, -11), (11, 1), (-11, -1)
   \]

5. For each factor pair \((a, b)\), solve for \(x\) and \(y\):
   - If \((x-5) = 1\) and \((y-2) = 11\):
     \[
     x - 5 = 1 \implies x = 6
     \]
     \[
     y - 2 = 11 \implies y = 13
     \]
     So, one solution is \((6, 13)\).

   - If \((x-5) = -1\) and \((y-2) = -11\):
     \[
     x - 5 = -1 \implies x = 4
     \]
     \[
     y - 2 = -11 \implies y = -9
     \]
     So, another solution is \((4, -9)\).

   - If \((x-5) = 11\) and \((y-2) = 1\):
     \[
     x - 5 = 11 \implies x = 16
     \]
     \[
     y - 2 = 1 \implies y = 3
     \]
     So, another solution is \((16, 3)\).

   - If \((x-5) = -11\) and \((y-2) = -1\):
     \[
     x - 5 = -11 \implies x = -6
     \]
     \[
     y - 2 = -1 \implies y = 1
     \]
     So, another solution is \((-6, 1)\).

6. We have found four pairs of integers \((x, y)\) that satisfy the equation:
   \[
   (6, 13), (4, -9), (16, 3), (-6, 1)
   \]

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