The crabs are neet, but it sure seems like they would try to eat your fish. your bottom feeders would be especially at risk.
I would not keep a rainbow shark with kuhli loaches.
without the crabs and shark, you could likely keep like 15-25 kuhli loaches.
If you really want the shark, theire are larger, bolder loaches like yoyo, zebra, and polk a dot. That are not too big when full grown, but could compete for food and stand up to a rainbow shark.