function [n_beats] = count_all_beats(MX)
% Function that counts the number of Vgets and VPs
% MX=input matrix
% n_beats = number of AP and VP

n_beats=0;

for i=1:size(MX,1),
    if MX(i,3)==3 || MX(i,3)==4,
        n_beats=n_beats+1;
    end
end

end