SELECT COUNT(*) AS page_count FROM invoice AS inv WHERE DATE_ADD( sent_date, INTERVAL due_days DAY ) < now( ) AND inv.paid='2'