On the number of models between a ground model and its forcing extension

Let $\kappa$ be a (finite or infinite) cardinal. Assuming consistency of $\text{ZFC}$ (and probabely some additional assumptions) is the following consistent with $\text{ZFC}$?

There is a countable transitive model of $\text{ZFC}$ like $M$ and a partial order $\mathbb{P}$ in $M$ and $\mathbb{P}$-generic filter $G$ over $M$ such that:

$|\{N~|~N~\text{is a countable transitive model of ZFC and}~M\subseteq N\subseteq M[G]\}|=\kappa$

First, let me note that no uncountable cardinal $\kappa$ (uncountable in $V$) can arise in the way you have stated, where $M$ and $M[G]$ are fixed. The reason is that every such model $N$ is determined by a complete subalgebra $\mathbb{B}$ of the Boolean algebra of $\mathbb{P}$ from the perspective of $M$, because $N=M[G\cap\mathbb{B}]$, and since $M$ is countable, there are only countably many such $\mathbb{B}$ in $M$. (The fact that all intermediate models arise this way is proved in Jech's book.)
Meanwhile, clearly $\kappa=\aleph_0$ is possible, in the case that $M[G]$ is obtained by adding a Cohen real over $M$, since $M$ will have have infinitely many strictly intermediate forcing extensions, by restricting the Cohen real to a real in $M$.
Also, $\kappa=1$ is possible by choosing $M=M[G]$, and $\kappa=2$ is possible by means of Sacks forcing. Indeed, it follows from results of Groszek and Shore that any nonzero finite cardinal can arise in this way (and much more).
But lastly, I think you have asked your question in a peculiar manner, because you ask if it is consistent that there is a countable model $M$ with a forcing extension $M[G]$ like that, but the cardinal $\kappa$ is a cardinal in $V$, rather than in $M$. A more natural version of the question, to my way of thinking, would be to inquire about the consistency of a particular pattern for the inner models between $V$ and a forcing extension $V[G]$. That is, to ask the question from the perspective of $M$ and $M[G]$, where now $\kappa$ is a cardinal of $M$. And now the thing to say is that the collection of inner models $N$ is closely related to the collection of complete subalgebras of the Boolean completion of the forcing $\mathbb{P}$ giving rise to the extension $V[G]$. So one transforms this question about inner models of forcing extensions to a purely algebraic/combinatorial question about the nature of the collection of complete subalgebras of a particular Boolean algebra.
For finite $\kappa$ such models can be obtained by iterating Sacks forcing. Marcia Groszek has results about the possible patterns of inner models between a countable model $M$ and a forcing extension, i.e., partial answers to the question that Joel Hamkins thinks you intended to ask (in his answer that appeared while I was typing this).