function nr=getcount(uba)
nr=length(uba.units);
