Eh, I think I fixed it.

Changed the 'select count *' to 'select count(*)'