In a real world (246060) is not a day 🙂
mysql has better date-time functions.
such as interval
SELECT (`date_field` - INTERVAL 1 DAY) AS oneday_min FROM timestable;
No need to hardcode these things in php, BETWEEN is a better interval function in mySQL.
time is a timestamp? becouse time() gives you back a simple number. What is your database field: time ?
See your code, the email index in the $count array is undefined: Use quote.marks.
You should use error reporting while you troubleshoot your code:
// Report all PHP errors
error_reporting(E_ALL);
// Same as error_reporting(E_ALL);
ini_set('error_reporting', E_ALL);
Good luck 🙂