function [transition_num,emmision_num]=count_emmision_transition(simulated_hidden_path,observation,transition_num,emmision_num)

ss=simulated_hidden_path;
LL=length(ss);
L=length(observation);
rss=[];
for i=1:LL
    if ((ss(i)~=1)&&(ss(i)~=5)&&(ss(i)~=8)&&(ss(i)~=11)&&(ss(i)~=14)&&(ss(i)~=17)&&(ss(i)~=20)&&(ss(i)~=21))
        rss=[rss , ss(i)];
    end
end
for i=1:(LL-1)
    transition_num(ss(i),ss(i+1))=transition_num(ss(i),ss(i+1))+1;
end
for i=1:L
    emmision_num(rss(i),observation(i))=emmision_num(rss(i),observation(i))+1;
end
   