select count(*) from syslog where ReceivedAt > (curdate() - 3 months)
if it seems what you want to delete just replace select count with delete