Commas should be included when you want to make the logical separation of elements clearer. Let's take your examples:
How many people, would you say you've hurt, playing a prank on them that way?
Here the first comma is jarring. Why does "how many people" need to be separated from "would you say you've hurt"? What purpose does that serve?
The second comma is a different story. As @TRomano has stated, it's an optional placement. Here we are clearly separating the subordinate clause of playing a prank on them that way from the main clause it describes. We could still easily understand the sentence without that clarification (hence why the comma is optional), but having it there takes a bit of the work out of parsing the sentence.
(#2) How many people would you say you've hurt playing a prank on them that way?
The sentence may run on, but grammatically, it is valid without any commas.
So to summarize the answer to your questions:
- No, the first sentence would be considered grammatically incorrect with the placement of the first comma. The second sentence, however, is fine.
- No, the commas are not necessary where they've been put.
Let me further give you a few easy guidelines about when to use commas in English.
- When you're separating elements of a series.
- I need a gallon of milk, a loaf of bread, and a stick of butter.
- When you're joining two small sentences into one larger sentence (joining independent clauses).
- I'll buy the hot dogs, and you should buy the buns.
- To set off a descriptive-but-unnecessary part of a sentence (an introductory element, parenthetical element, interjection, etc.).
- As I was standing by the tree, I realized that my shoe was on fire.
- Grandma's goal, to finish a Boston marathon, is finally within her reach.
- I'm serious, Gus, you should take the bus.
- To avoid confusion.
- To avoid accidental cannibalism (Let's eat Grandma):
- My personal favorite example for why the Oxford Comma is a good idea: