Now the function returns quantity of parts