I've found in a template file, a code like the one below:
$collection = Mage::getModel('catalog/product_link')
->getCollection()
->addFieldToFilter('product_id', $_product->getId());
It's used to display additional tabs in product view if($collection->count())
, the problem is that it doesn't care if products in collection are enabled or disabled.
What would be the easiest way to count, using "the same code", only the enabled products?