I have 2 sites, on 2 different hosts and databases, both running php5. On one site $wp_query->found_posts returns a proper value, but on the other one it always returns 0, even though posts are being displayed and value in $wp_query->post_count is correct. They're using the exact same template files, they both have 20 posts and are configured to display 5 on a page.
Apart from that, all other features work fine on both sites.
For testing, I created an archive.php file, with no extra plugins or functions, with a single line of code giving different results on 2 sites:
<?php echo $wp_query->found_posts; ?>
I would greatly appreciate any help, as I am completely baffled.