Thank you O.Jones, this is much faster than I thought :)
I just added the count (*) so the request is
SELECT userID, COUNT(*), MAX(pagenumber) max_pagenumber, MAX(date)latest_date FROM whateveryourtablehame GROUP BY userID