DB Error: syntax error

SELECT count(*) as ilosc FROM ant_dokumenty doc WHERE [nativecode=ERROR: syntax error at end of input LINE 1: SELECT count(*) as ilosc FROM ant_dokumenty doc WHERE ^] (Szablon->PokazListeDokumentow)