Learning Drupal is the smartest thing you can do.
Count all nodes
For a site that let users create advertisements I needed to display how many nodes that actually was published or available. Since I'm not a programmer I went into drupal support on irc and a helpful person handed me this code.
<?php
$result = db_query('SELECT COUNT(*) as nodes FROM node WHERE status = 1');
$arr = db_fetch_array($result);
print_r($arr['nodes']);
?>
To enable this, activate the Php Filter from Drupal core modules and create a block with the php-input-filter selected.
