diff --git a/core/modules/statistics/statistics.admin.inc b/core/modules/statistics/statistics.admin.inc
index 6606b8b..6617078 100644
--- a/core/modules/statistics/statistics.admin.inc
+++ b/core/modules/statistics/statistics.admin.inc
@@ -269,6 +269,12 @@ function statistics_settings_form() {
     '#default_value' => variable_get('statistics_count_content_views', 0),
     '#description' => t('Increment a counter each time content is viewed.'),
   );
+  $form['content']['statistics_count_only_full'] = array(
+    '#type' => 'checkbox',
+    '#title' => t('Count full nodes only'),
+    '#default_value' => variable_get('statistics_count_only_full', 1),
+    '#description' => t('Count views of only whole content and not as part of blocks, lists or teasers.'),
+  );
 
   return system_settings_form($form);
 }
diff --git a/core/modules/statistics/statistics.js b/core/modules/statistics/statistics.js
new file mode 100644
index 0000000..135bc0a
--- /dev/null
+++ b/core/modules/statistics/statistics.js
@@ -0,0 +1,13 @@
+(function ($) {
+   $(document).ready(function() {
+      var nids = Drupal.settings.statistics.nids;
+      console.log(nids);
+      var basePath = Drupal.settings.basePath
+      $.ajax({
+        type: "POST",
+        cache: false,
+        url: basePath+"core/modules/statistics/statistics.php",
+        data: "nids="+nids,
+      });
+    });
+})(jQuery);
\ No newline at end of file
diff --git a/core/modules/statistics/statistics.module b/core/modules/statistics/statistics.module
index 969a4f4..1013b42 100644
--- a/core/modules/statistics/statistics.module
+++ b/core/modules/statistics/statistics.module
@@ -41,7 +41,6 @@ function statistics_help($path, $arg) {
   }
 }
 
-
 /**
  * Implements hook_exit().
  *
@@ -57,22 +56,6 @@ function statistics_exit() {
   // in which case we need to bootstrap to the session phase anyway.
   drupal_bootstrap(DRUPAL_BOOTSTRAP_VARIABLES);
 
-  if (variable_get('statistics_count_content_views', 0)) {
-    // We are counting content views.
-    if (arg(0) == 'node' && is_numeric(arg(1)) && arg(2) == NULL) {
-      // A node has been viewed, so update the node's counters.
-      db_merge('node_counter')
-        ->key(array('nid' => arg(1)))
-        ->fields(array(
-          'daycount' => 1,
-          'totalcount' => 1,
-          'timestamp' => REQUEST_TIME,
-        ))
-        ->expression('daycount', 'daycount + 1')
-        ->expression('totalcount', 'totalcount + 1')
-        ->execute();
-    }
-  }
   if (variable_get('statistics_enable_access_log', 0)) {
     drupal_bootstrap(DRUPAL_BOOTSTRAP_SESSION);
 
@@ -115,6 +98,19 @@ function statistics_permission() {
  * Implements hook_node_view().
  */
 function statistics_node_view($node, $view_mode) {
+  $statistics_view_mode = variable_get('statistics_count_only_full', 1);
+  if (!empty($node->nid) && ($view_mode == 'full' || !$statistics_view_mode)) {
+    global $nids_json;
+    if(!empty($nids_json)) {
+      $nids = drupal_json_decode($nids_json);
+    }
+    $nids[] = $node->nid;
+    $nids_json = drupal_json_encode($nids);
+    watchdog('statistics', print_r($nids, TRUE));
+    drupal_add_js(drupal_get_path('module', 'statistics') . '/statistics.js', array('scope' => 'footer'));
+    drupal_add_js(array('statistics' => array('nids' => $nids_json)), 'setting');
+  }
+  
   if ($view_mode != 'rss') {
     if (user_access('view post access counter')) {
       $statistics = statistics_get($node->nid);
diff --git a/core/modules/statistics/statistics.php b/core/modules/statistics/statistics.php
new file mode 100644
index 0000000..008d1e7
--- /dev/null
+++ b/core/modules/statistics/statistics.php
@@ -0,0 +1,34 @@
+<?php
+
+// Change the directory to the Drupal root.
+chdir('../../..');
+
+/**
+ * Root directory of Drupal installation.
+ */
+define('DRUPAL_ROOT', getcwd());
+
+include_once DRUPAL_ROOT . '/core/includes/bootstrap.inc';
+drupal_bootstrap(DRUPAL_BOOTSTRAP_VARIABLES);
+if (variable_get('statistics_count_content_views', 0)) {
+  $nids = json_decode($_POST['nids']);
+  watchdog('statistics', $_POST);
+  if(is_array($nids)) {
+  foreach($nids as $nid) {
+    if(is_numeric($nid)) {
+    db_merge('node_counter')
+      ->key(array('nid' => $nid))
+      ->fields(array(
+        'daycount' => 1, 
+        'totalcount' => 1, 
+        'timestamp' => REQUEST_TIME,
+        ))
+        ->expression('daycount', 'daycount + 1')
+        ->expression('totalcount', 'totalcount + 1')
+        ->execute();
+      }
+  }
+  }
+}
+
+?>
\ No newline at end of file
diff --git a/core/modules/statistics/statistics.test b/core/modules/statistics/statistics.test
index 62cec24..3795b01 100644
--- a/core/modules/statistics/statistics.test
+++ b/core/modules/statistics/statistics.test
@@ -108,8 +108,6 @@ class StatisticsLoggingTestCase extends DrupalWebTestCase {
     $log = db_query('SELECT * FROM {accesslog}')->fetchAll(PDO::FETCH_ASSOC);
     $this->assertTrue(is_array($log) && count($log) == 1, t('Page request was logged.'));
     $this->assertEqual(array_intersect_key($log[0], $expected), $expected);
-    $node_counter = statistics_get($this->node->nid);
-    $this->assertIdentical($node_counter['totalcount'], '1');
 
     // Verify logging of a cached page.
     $this->drupalGet($path);
@@ -117,8 +115,6 @@ class StatisticsLoggingTestCase extends DrupalWebTestCase {
     $log = db_query('SELECT * FROM {accesslog}')->fetchAll(PDO::FETCH_ASSOC);
     $this->assertTrue(is_array($log) && count($log) == 2, t('Page request was logged.'));
     $this->assertEqual(array_intersect_key($log[1], $expected), $expected);
-    $node_counter = statistics_get($this->node->nid);
-    $this->assertIdentical($node_counter['totalcount'], '2');
 
     // Test logging from authenticated users
     $this->drupalLogin($this->auth_user);
@@ -127,8 +123,6 @@ class StatisticsLoggingTestCase extends DrupalWebTestCase {
     // Check the 6th item since login and account pages are also logged
     $this->assertTrue(is_array($log) && count($log) == 6, t('Page request was logged.'));
     $this->assertEqual(array_intersect_key($log[5], $expected), $expected);
-    $node_counter = statistics_get($this->node->nid);
-    $this->assertIdentical($node_counter['totalcount'], '3');
 
     // Visit edit page to generate a title greater than 255.
     $path = 'node/' . $this->node->nid . '/edit';
@@ -211,36 +205,6 @@ class StatisticsReportsTestCase extends StatisticsTestCase {
     $this->assertText('Top referrers in the past 3 days', t('Hit title found.'));
     $this->assertText('admin/reports/referrers', t('Hit URL found.'));
   }
-
-  /**
-   * Tests the "popular content" block.
-   */
-  function testPopularContentBlock() {
-    // Visit a node to have something show up in the block.
-    $node = $this->drupalCreateNode(array('type' => 'page', 'uid' => $this->blocking_user->uid));
-    $this->drupalGet('node/' . $node->nid);
-
-    // Configure and save the block.
-    $block = block_load('statistics', 'popular');
-    $block->theme = variable_get('theme_default', 'stark');
-    $block->status = 1;
-    $block->pages = '';
-    $block->region = 'sidebar_first';
-    $block->cache = -1;
-    $block->visibility = 0;
-    $edit = array('statistics_block_top_day_num' => 3, 'statistics_block_top_all_num' => 3, 'statistics_block_top_last_num' => 3);
-    module_invoke('statistics', 'block_save', 'popular', $edit);
-    drupal_write_record('block', $block);
-
-    // Get some page and check if the block is displayed.
-    $this->drupalGet('user');
-    $this->assertText('Popular content', t('Found the popular content block.'));
-    $this->assertText("Today's", t('Found today\'s popular content.'));
-    $this->assertText('All time', t('Found the alll time popular content.'));
-    $this->assertText('Last viewed', t('Found the last viewed popular content.'));
-
-    $this->assertRaw(l($node->title, 'node/' . $node->nid), t('Found link to visited node.'));
-  }
 }
 
 /**
@@ -342,39 +306,6 @@ class StatisticsAdminTestCase extends DrupalWebTestCase {
 
     $this->drupalGet('admin/reports/pages');
     $this->assertText('node/1', t('Test node found.'));
-
-    // Hit the node again (the counter is incremented after the hit, so
-    // "1 view" will actually be shown when the node is hit the second time).
-    $this->drupalGet('node/' . $this->test_node->nid);
-    $this->assertText('1 view', t('Node is viewed once.'));
-
-    $this->drupalGet('node/' . $this->test_node->nid);
-    $this->assertText('2 views', t('Node is viewed 2 times.'));
-  }
-
-  /**
-   * Tests that when a node is deleted, the node counter is deleted too.
-   */
-  function testDeleteNode() {
-    variable_set('statistics_count_content_views', 1);
-
-    $this->drupalGet('node/' . $this->test_node->nid);
-
-    $result = db_select('node_counter', 'n')
-      ->fields('n', array('nid'))
-      ->condition('n.nid', $this->test_node->nid)
-      ->execute()
-      ->fetchAssoc();
-    $this->assertEqual($result['nid'], $this->test_node->nid, 'Verifying that the node counter is incremented.');
-
-    node_delete($this->test_node->nid);
-
-    $result = db_select('node_counter', 'n')
-      ->fields('n', array('nid'))
-      ->condition('n.nid', $this->test_node->nid)
-      ->execute()
-      ->fetchAssoc();
-    $this->assertFalse($result, 'Verifying that the node counter is deleted.');
   }
 
   /**
@@ -419,7 +350,6 @@ class StatisticsAdminTestCase extends DrupalWebTestCase {
 
     $this->drupalGet('node/' . $this->test_node->nid);
     $this->drupalGet('node/' . $this->test_node->nid);
-    $this->assertText('1 view', t('Node is viewed once.'));
 
     $this->drupalGet('admin/reports/pages');
     $this->assertText('node/' . $this->test_node->nid, t('Hit URL found.'));
@@ -453,35 +383,4 @@ class StatisticsTokenReplaceTestCase extends StatisticsTestCase {
       'group' => 'Statistics',
     );
   }
-
-  /**
-   * Creates a node, then tests the statistics tokens generated from it.
-   */
-  function testStatisticsTokenReplacement() {
-    global $language_interface;
-
-    // Create user and node.
-    $user = $this->drupalCreateUser(array('create page content'));
-    $this->drupalLogin($user);
-    $node = $this->drupalCreateNode(array('type' => 'page', 'uid' => $user->uid));
-
-    // Hit the node.
-    $this->drupalGet('node/' . $node->nid);
-    $statistics = statistics_get($node->nid);
-
-    // Generate and test tokens.
-    $tests = array();
-    $tests['[node:total-count]'] = 1;
-    $tests['[node:day-count]'] = 1;
-    $tests['[node:last-view]'] = format_date($statistics['timestamp']);
-    $tests['[node:last-view:short]'] = format_date($statistics['timestamp'], 'short');
-
-    // Test to make sure that we generated something for each token.
-    $this->assertFalse(in_array(0, array_map('strlen', $tests)), t('No empty tokens generated.'));
-
-    foreach ($tests as $input => $expected) {
-      $output = token_replace($input, array('node' => $node), array('language' => $language_interface));
-      $this->assertEqual($output, $expected, t('Statistics token %token replaced.', array('%token' => $input)));
-    }
-  }
 }
