select count(t.idtitem) as cnt from itemgrp g left join titem t on g.idtitem=t.idtitem where t.cantag<>1 and t.onlinetag=1 and t.nwarrtag=1