Puoi contare righe lato client oppure con COUNT(*) OVER ().SELECT i.*, COUNT(*) OVER () FROM my_items i