function [n_Vg_beats n_VP_beats] = count_beats(MX)
% Function that counts the number of Vgets and VPs
% MX=input matrix
% n_Vg_beats = number of Vgets
% n_VP_beats = number of VPs

n_Vg_beats=0;
n_VP_beats=0;
for i=1:size(MX,1),
    if(MX(i,3)==2),
        n_Vg_beats=n_Vg_beats+1;
    elseif(MX(i,3)==3),
        n_VP_beats=n_VP_beats+1;        
    end
end

end