Do you mean (looking at your first post) your M21 is on sidecar gearing?
It's better to change the engine sprocket because if you put a different size sprocket on the rear chain, it will make the speedo less accurate. Changing the engine sprocket might mean you need a longer primary chain, though.