Since that code doesn't exist in productS.tpl, I assume you mean you tried to copy it from product.tpl? You'll notice that the Smarty variables work differently in the multi-product display than they do in the product display, so you can't just copy code from one to the other. Try this:
Code:
{$lng.lbl_quantity} {if $products[product].avail gt 0}{$products[product].avail}{else}{$lng.txt_no}{/if} {$lng.txt_items_available}