Id say it partially depends on how much rock you have, but I keep around 8-10 in my 40g to control bubble algae.
Edit: Forgot to mention that I banish them to sump or other tanks when they reach a certain size. I prefer the small guys without the giant claws.