The amount of megapixel determine how much details can be captured with a single shot. Of course you can get the same amount of detail with a lower resolution camera, but you would have to take more pictures while being closer to the object of interest.
Furthermore, with more megapixels (smaller pixel pitch), lens defects show more clearly- this means, better lens quality is needed for optimal utilization of the increased resolution. For example, unsharp corners might not show on a 10 mp sensor, while being clearly visible on a 36mp sensor.
In general, I would recommend to spend at least as much on the lenses as on the camera body. The value of the camera body decreases way more rapidly than lenses do.
The 35mm f2.8 is a lovely, tiny lens, which has a very good image quality. Also, what stihl said.
Cheers!