Without seeing the table, I'd say this is your problem: count(*)
You will want to have count() keep track of a particular field - not all fields (because all fields will include the date field which is probably pretty unique). I'd take a guess you'd want something like this:
SELECT count(DATE_FORMAT(datestamp,'%H')) AS cnt
FROM phplog
GROUP BY DATE_FORMAT(datestamp,'%H')
I haven't tested this so I'm not 100% that will work.