Just about as much as you like in the 10 (*edit, again!: within reason. 50 ghosties in a 10 gallon would be a tiny bit absurd, don't you think?). At one point, I had 7 ghost shrimp in my 10. I think if I had to do it over again, I'd only get 4. They're like a pack of crows, and happily outcompete any slow moving things in the tank for food. (*edit: You dont' have slow moving things, though, so I wouldn't overly worry about it. I have ADFs, and any competition for my frogs means they don't eat.)
For the 2.5, I'd get between 2 and 3. In fact, I think 3 would be the best choice, because they DO pick on each other sometimes, and 3 would help establish a tiny pecking order. If you have two simmilarly sized shrimps, two is fine. They don't get lonely, so if you want to test your betta (He may fancy a bit o prawn), you can get one to start off with and easily add, later.