If using dry chickpeas, soak them overnight in water. Drain them, and then boil them in a large pot of water for approximately 45 minutes, or until tender, being careful that they do not break apart.
Puree one cup of the chick peas in a food processor, adding some water as needed. In a large skillet, heat the olive oil and saute the onion until golden. Add the chick pea puree, the rosemary, and salt and pepper. Add about 1/2 cup water. After a couple of minutes, add the whole chick peas and stir. Cook over low heat for 10-15 minutes.
Meanwhile, bring a large pot of salted water to a boil. Cook the pasta until al dente. Drain it, retaining some of the cooking liquid. Add the pasta to the chick pea mixture. If the pasta seems dry, add some of the retained cooking water. Mix well and serve with a sprinkle of Parmigiano.
The total cooking and prep time assumes the use of canned chickpeas.