How Many CO Stitches Do I Need?

I am wanting to make a knitted pillow case. How would I determine how many stitches I will need to CO? I will be using a #7 needle and measurements are 16" X 36". Thank you. Margie:knitting:

The only way to do that is do a gauge swatch with your intended yarn and needle size. Cast on enough for at least a 4 inch swatch. Measure the gauge, then if it’s yarn that might shrink wash it as it’ll be washed normally and measure again.

Take the sts per inch from the sample you knit and multiply it by the width measurement. Add an extra or two for a seam.