Playing card game method
We can use the fact that in the ordered sequence of cards the cards that match your requirement will be located at the beginning of sequence, and their rank will match their position:

var count = _cards.Where(card =&gt; card.Suit == Suit.Spades)
    .Select(card =&gt; (int)card.Rank) //we only need the rank
    .Distinct() //ignoring multiple cards with the same rank
    .OrderBy(rank =&gt; rank) //sorting by rank
    .TakeWhile((rank, index) =&gt; rank == index) //taking all initial cards with index matching their rank
    .Count();

return count &lt; 3 ? 0 : count;


Note that your code will perform better than this one (you'll notice that only if you run it thousands times a second) since you're using the fact that there are only 10 sequential values present in Rank.