Prova così
codice:
SELECT idarticolo, COUNT(idstat) as num_visite FROM statistiche GROUP BY idarticolo