Complicating the task is the difficulty of distinguishing potentially dangerous militants from those attracted by the broader, nonviolent wave of interest in Islam that is now filling the mosques and Islamic centers on Fridays, especially with younger Afghans.