Download count of file in table of files So I wanted to add date alongside the size of the file in filefield table of files so I added this snippet to templates.php

function mytheme_file_formatter_table($variables) {
  $header = array(t('Attachment'), t('Size'),t('Upload Date and Time'));
  $rows = array();
  foreach ($variables['items'] as $delta =&gt; $item) {
    if ($item['timestamp'] == 0) {
      $item['timestamp'] = 1234567890;
    }
    $rows[] = array(
      theme('file_link', array('file' =&gt; (object) $item)),
      format_size($item['filesize']),
      format_date($item['timestamp'],'custom','Y/m/d - g:i'),
    );
  }
  asort($rows);
  return empty($rows) ? '' : theme('table', array('header' =&gt; $header, 'rows' =&gt; $rows));
}


It works just fine but I also need to show the download count of the file, and I have no clue on how to do this. Thanks
There's many ways to get this working depending on the type of file access you want.

File Download Count - counts download when it's really been downloaded and not just clicked, new so I can't post more than 2 links. Google this. 

Public Download Count - track public files

Download Count - track private files