user196: Like I would do wget -O - http://blockchain.info/q/getblockcount 2>/dev/null for the main net.

user120: Blockchain.info does not track the testnet, but blockexplorer.com does. In fact the API you're using was originally from blockexplorer.com, and blockchain.info simply adopted it.
wget -O - http://blockexplorer.com/testnet/q/getblockcount 2> /dev/null

or shorter
curl http://blockexplorer.com/testnet/q/getblockcount


196: <p>Like I would do <code>wget -O - http://blockchain.info/q/getblockcount 2&gt;/dev/null</code> for the main net.</p>
 120: <p>Blockchain.info does not track the testnet, but blockexplorer.com does. In fact the API you're using was originally from blockexplorer.com, and blockchain.info simply adopted it.</p>

<pre><code>wget -O - http://blockexplorer.com/testnet/q/getblockcount 2&gt; /dev/null
</code></pre>

<p>or shorter</p>

<pre><code>curl http://blockexplorer.com/testnet/q/getblockcount
</code></pre>
