select count(*) cnt
from afm90
where cls=:cls
  and nvl(scls1,'NULL')=nvl(:scls1,'NULL') and nvl(scls2,'NULL')=nvl(:scls2,'NULL')
  and nvl(scls3,'NULL')=nvl(:scls3,'NULL') and nvl(scls4,'NULL')=nvl(:scls4,'NULL')