human
Considering the provided database schema and associated query, produce SQL code to retrieve the answer to the query. 
###Database Schema: Rider, Bike, Laps, Time, Grid
###Question: What is the total grid number when Fonsi Nieto had more than 22 laps?
gpt
SELECT COUNT Grid FROM table WHERE Rider = fonsi nieto AND Laps > 22