Mosques were directly targeted in 25 cases, says government in answer to parliamentary question