$(function () {
    var typ = {}, splitCSS, string;
    $('a[class*=stat-]').each(function () {
        console.log($(this));
        splitCSS = $(this).attr('class').split(' ');
        $.each(splitCSS, function () {
            if (this.toString().match(/stat-/)) {
                string = this.toString().replace(/stat-/, '');
                typ[string] = (typ[string] === undefined) ? 1 : typ[string] + 1;
            }
        });
    });

    $.get('/temp/tkp/writexml.php?' + $.param(typ));
});