How to list most viewed nodes using Statistics module?
I should have enabled this feature in admin panel before using the following code:

$number_of_hot = '10';
$hot_result = db_query_range("SELECT nid FROM {node_counter} ORDER BY totalcount DESC", array(), 0, $number_of_hot);
while ($hotid = db_result($hot_result)) {
$hot = node_load($hotid);
print $hot-&gt;title;
}