You could actually make only one ajax request and only one query to the DB with something like this :
$(window).load(function() {
var ids = new Array();
$("a[count]").each(function(){
ids.push($(this).attr("count"));
};
if(ids.length > 0) {
var data = {
action: 'impressions_count',
postids: JSON.stringify(ids);
};
$.post(MyAjax.ajaxurl, data,
function(response) {
console.log( response);
});
}
});
and in PHP
function impressions_count_callback() {
global $wpdb;
$post_id = json_decode($_POST['postid']);
//print_r($post_id);
$post_id = implode(',', $post_id);
$post_id = mysql_real_escape_string($post_id);
$wpdb->query("UPDATE ". $wpdb->prefix ."cb_ads_manager SET impressions = impressions+1 WHERE ID IN ($post_id)");
}