select count(*) from NetTeacherStudent as nts where exists(select id from NetTeacher as nt where nt.user.username='"+username+"' and nts.teacher.id=nt.id)
select count(*) from NetTeacherStudent as nts where exists(select id from NetTeacher as nt where nt.user.username='"+username+"' and nts.teacher.id=nt.id)