If you have predatory fish the amount of ghost shrimp you can get away with depends on the number of hiding spaces you have for them. I have plants and caves in my tank and a very inquisitive angel who has eaten shrimp in the past. Yet, in spite of this, I still have about 7 or 8 shrimp left in the tank......and I haven't added any more for about a year now. They mostly hide during the day or come out when I put food in the tank. They're pretty safe at that time since the angel is focused entirely on the quick meal rather than the critters it might have to hunt.
Just give your shrimp some plants and caves to hide in and you'll be fine. You can start out with something like 10 if you want. Don't be surprised if you see that number dwindle over time. There are only so many hiding spaces in a 10 gallon and the shrimp will take a little while to figure out the best way to hide from the betta. Eventually, though, you'll get to some kind of equillibrium and you'll have a few "permanent" ghosties. Again, that final number will depend on how many hiding spaces you have and how aggressive/hungry your betta is.