Start here
Your sleeping position sets the number.
Side sleepers need the most, because your shoulder lifts your head several inches off the mattress and something has to fill that gap. Most land between four and six inches, and broad shoulders need the top of that or above.
Back sleepers need much less, around three to four, because lying flat the back of your head is nearly level with the bed and the pillow's real job is filling the hollow behind your neck. Stomach sleepers need the least of anyone, sometimes almost none, because any height bends the neck backwards on top of the rotation.
4 to 6 inside sleepers
3 to 4 inback sleepers