user2698: It is possible in a chess game to have a dead position in which both players have all eight pawns, one bishop, and a king--20 pieces total.  If the two players' pawns are interlocked in "zig-zag" fashion and each player's bishop is the same color as his pawns, each player's army will be forever stuck behind his own wall of pawns, with no way to ever reach anything on the other side.
[FEN "4kb2/8/1p1p5/pPpPp1p1/P1P1PpPp/5P1P/8/4KB2 w - - 0 1"]

What is the largest number of pieces that can be on the board in a legally-reachable position such that either:

The side on move has at least one legal move, but no sequence of legal moves would produce checkmate.
It would be possible to play an arbitrary number of legal moves, but no sequence of legal moves would produce checkmate.
No legal sequence of legal moves would produce checkmate or stalemate.

I would guess that the first of those might be possible with as many as 28 pieces on the board, but most escape-proof positions rely upon immobilized kings to block opposing pawns, making it hard to allow anything other than pawns to move safely.  What are the actual limits?

user8201: The three dead position challenges are (1) general (2) no finite mandatory stalemate (3) definitely no stalemate possible ever. (3)=>(2)=>(1).
Retro enthusiasts often sub-divide Task Records into 3 types:
- Type A = no additional information in the stipulation
- Type B = you are told who is on move (e.g. White here), but there is no check.
- Type C = one player is in check.
The posts so far have focused on OP's challenge (3). Here are a couple for challenge (1):  
[title "Challenge 1, Type B, 31 units, Last move?"]
[fen "brnk1N1B/qnb1pBR1/rbKpP3/p1pP2NQ/P1P2p2/1p3P1p/1P5P/5R2 w - - 0 1"]  

White to move. Last move?
Black's last move must have been b4-b3. If the prior position was dead, the game would have already terminated. So White's move before that was a2-a4 or c2-c4, and Black chose not to make the en passant capture, which would have kept the game alive. No en passant convention is required here: White's double pawn move is the only way the game could have reached the current position without dying already.
This position was built many years ago, to force a unique last move. Without that additional goal, it's easy to make a 32 unit dead position.  
[title "Challenge 1, Type B, 32 units"]  
[fen "bqn1KN2/rrk1pB2/nb1pPp1p/p1pP1PpP/PpP3P1/1P2N1R1/4Q3/1R4B1 w - - 0 1"]  

White to move.
Moving on to challenge 3, Olivier Pucher had 27 pieces, Type C. I offer:
[title "Challenge 3, Type A, 29 units"]  
[fen "qrn1KRRB/brk1pPN1/1p1pPp1p/1P1P1P1P/1p6/1Pp5/2P5/N5bB w - - 0 1"]

and:
[title "Challenge 3, Type C, 30 units"]
[fen "brn1KRRB/brN1pPN1/1bkpPp1p/p1pP1P1P/q1P5/1P6/1Q6/b4B2 w - - 0 1"]  


user9025: I've come up with 23, in the following position, with promotions: 
[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "*"]
[FEN "nb2k3/2p5/1pP5/1Pp5/2P1p1p1/3pPpPp/3P1P1B/4KNBN w - - 0 1"]

*

user14079: Funny task. I think I'm still pretty far from the maximum, but here is a suggestion with 
23 men:
[Event "?"]
[title "Challenge 3, 23 units"]
[FEN "NRN1k1bn/QRKpPp2/PPpP1Pp1/2P3Pp/7P/8/7B/8 w - - 0 1"]

With black to move, an almost-dishonest trick to reach 25:
[title "Challenge 3, BTM, 25 units"]
[FEN "BRN1Nkbn/QRKpPp2/PPpP1Pp1/2P3Pp/7P/8/1r6/B7 b - - 0 1"]

27 with promoted units:
[title "Challenge 3, Check, 27 unit, including promoted"]
[FEN "QNBk1bnr/RBpPpKbr/PpP1Pp1p/1P3P1q/6P1/8/1R6/b7 w - - 0 1"]

explanation: 
This is a dead draw because after the forced moves 1.gxh5 Bxb2, White could only play his king back and forth on f7 and g6 while Black's bishop explores the bottom half of the board.
wRb2 could be replaced by a wB or a wN (or a wQ with obvious adjustment of the nature of the upper-left-corner stranded pieces), or even by a fourth bB while preserving legality. This is so many "degrees of freedom" that I strongly feel that 27 is not the maximum, and someone will soon come up with (at least) 28...
edit: indeed, Laska just scored a pretty 28 (or even 30 with "the trick").

2698: <p>It is possible in a chess game to have a dead position in which both players have all eight pawns, one bishop, and a king--20 pieces total.  If the two players' pawns are interlocked in "zig-zag" fashion and each player's bishop is the same color as his pawns, each player's army will be forever stuck behind his own wall of pawns, with no way to ever reach anything on the other side.</p>

<pre><code>[FEN "4kb2/8/1p1p5/pPpPp1p1/P1P1PpPp/5P1P/8/4KB2 w - - 0 1"]
</code></pre>

<p>What is the largest number of pieces that can be on the board in a legally-reachable position such that either:</p>

<ol>
<li><p>The side on move has at least one legal move, but no sequence of legal moves would produce checkmate.</p></li>
<li><p>It would be possible to play an arbitrary number of legal moves, but no sequence of legal moves would produce checkmate.</p></li>
<li><p>No legal sequence of legal moves would produce checkmate or stalemate.</p></li>
</ol>

<p>I would guess that the first of those might be possible with as many as 28 pieces on the board, but most escape-proof positions rely upon immobilized kings to block opposing pawns, making it hard to allow anything other than pawns to move safely.  What are the actual limits?</p>
 8201: <p>The three dead position challenges are (1) general (2) no finite mandatory stalemate (3) definitely no stalemate possible ever. (3)=>(2)=>(1).</p>

<p>Retro enthusiasts often sub-divide Task Records into 3 types:<br>
- Type A = no additional information in the stipulation<br>
- Type B = you are told who is on move (e.g. White here), but there is no check.<br>
- Type C = one player is in check.</p>

<p>The posts so far have focused on OP's challenge (3). Here are a couple for challenge (1):  </p>

<pre><code>[title "Challenge 1, Type B, 31 units, Last move?"]
[fen "brnk1N1B/qnb1pBR1/rbKpP3/p1pP2NQ/P1P2p2/1p3P1p/1P5P/5R2 w - - 0 1"]  
</code></pre>

<p>White to move. Last move?</p>

<p>Black's last move must have been b4-b3. If the prior position was dead, the game would have already terminated. So White's move before that was a2-a4 or c2-c4, and Black chose not to make the en passant capture, which would have kept the game alive. No en passant convention is required here: White's double pawn move is the only way the game could have reached the current position without dying already.</p>

<p>This position was built many years ago, to force a unique last move. Without that additional goal, it's easy to make a 32 unit dead position.  </p>

<pre><code>[title "Challenge 1, Type B, 32 units"]  
[fen "bqn1KN2/rrk1pB2/nb1pPp1p/p1pP1PpP/PpP3P1/1P2N1R1/4Q3/1R4B1 w - - 0 1"]  
</code></pre>

<p>White to move.</p>

<p>Moving on to challenge 3, Olivier Pucher had 27 pieces, Type C. I offer:</p>

<pre><code>[title "Challenge 3, Type A, 29 units"]  
[fen "qrn1KRRB/brk1pPN1/1p1pPp1p/1P1P1P1P/1p6/1Pp5/2P5/N5bB w - - 0 1"]
</code></pre>

<p>and:</p>

<pre><code>[title "Challenge 3, Type C, 30 units"]
[fen "brn1KRRB/brN1pPN1/1bkpPp1p/p1pP1P1P/q1P5/1P6/1Q6/b4B2 w - - 0 1"]  
</code></pre>
 9025: <p>I've come up with 23, in the following position, with promotions: </p>

<pre><code>[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "?"]
[Black "?"]
[Result "*"]
[FEN "nb2k3/2p5/1pP5/1Pp5/2P1p1p1/3pPpPp/3P1P1B/4KNBN w - - 0 1"]
</code></pre>

<p>*</p>
 14079: <p>Funny task. I think I'm still pretty far from the maximum, but here is a suggestion with </p>

<p><strong>23 men</strong>:</p>

<pre><code>[Event "?"]
[title "Challenge 3, 23 units"]
[FEN "NRN1k1bn/QRKpPp2/PPpP1Pp1/2P3Pp/7P/8/7B/8 w - - 0 1"]
</code></pre>

<p><strong>With black to move, an almost-dishonest trick to reach 25</strong>:</p>

<pre><code>[title "Challenge 3, BTM, 25 units"]
[FEN "BRN1Nkbn/QRKpPp2/PPpP1Pp1/2P3Pp/7P/8/1r6/B7 b - - 0 1"]
</code></pre>

<p><strong>27 with promoted units</strong>:</p>

<pre><code>[title "Challenge 3, Check, 27 unit, including promoted"]
[FEN "QNBk1bnr/RBpPpKbr/PpP1Pp1p/1P3P1q/6P1/8/1R6/b7 w - - 0 1"]
</code></pre>

<p><em>explanation</em>: 
This is a dead draw because after the forced moves 1.gxh5 Bxb2, White could only play his king back and forth on f7 and g6 while Black's bishop explores the bottom half of the board.
wRb2 could be replaced by a wB or a wN (or a wQ with obvious adjustment of the nature of the upper-left-corner stranded pieces), or even by a fourth bB while preserving legality. This is so many "degrees of freedom" that I strongly feel that 27 is not the maximum, and someone will soon come up with (at least) 28...</p>

<p><em>edit</em>: indeed, Laska just scored a pretty 28 (or even 30 with "the trick").</p>
