How to hook into fivestar_ajax_submit function?
My friend helped me with this solution:

function MYMODULE_element_info_alter(&amp;$info) {
    $info['fivestar']['#process'][] = 'MYMODULE_fivestar_process';
}

function MYMODULE_fivestar_process($element) {
    $element['vote']['#ajax']['callback'] = 'MYMODULE_fivestar_ajax_submit';
    return $element;
}

function MYMODULE_fivestar_ajax_submit($form, $form_state) {
    $result = fivestar_ajax_submit($form, $form_state);

    $type = $form_state['build_info']['args'][1]['content_type'];
    $id = $form_state['build_info']['args'][1]['content_id'];
    $votes = fivestar_get_votes($type, $id, 'vote', $GLOBALS['user']-&gt;uid);

    $result['#commands'][] = array(
        'command' =&gt; 'insert',
        'method' =&gt; 'replaceWith',
        'selector' =&gt; 'span.vote-count',
        'data' =&gt; '&lt;span class="vote-count"&gt;' . format_plural($votes['count']['value'], '1 vote', '@count votes') . '&lt;/span&gt;',
        'effect' =&gt; 'fade'
    );
    return $result;
}


This code adds and change votes counter displayed after fivestar voting widget.