function [Hexanum,Pentanum,listpenta]=GetElemTypes(elem)

Hexanum=size(elem,1);
Pentanum=0;
counter=0;

listpenta=[0 0];

for c=1:size(elem,1)
    
    if elem(c,4) == elem(c,5)
        Pentanum=Pentanum+1;
        Hexanum=Hexanum-1;
        
        % create list of penta elements
        counter=counter+1;
        listpenta(counter,1)=elem(c,1);
        listpenta(counter,2)=c;
    end
    
end


end % function end