If you take a tape measure and measure around your foot at its widest part (up towards your toes), what is the measurement? (Make sure to pull the tape measure really tight around the wide part of your foot when you are measuring).
When you have that measurement, multiply it by your gauge (6 stitches/inch) and that will give you the number of stitches to cast on.
Eg if your foot circumference measurement was 7.5 inches:
Number of stitches to cast on= 7.5 x 6 = 45 stitches (you would adjust this number to 44 for k2p2 ribbing, and if you wanted the sock tighter still, you could reduce down to 40 stitches for the cast-on).
Tip: When you start your sock cuffs, use needles 1 size up for the first inch or so, and then switch down to the needles you swatched with to continue the cuff and the rest of the sock.
For the heel flap, it's generally 1/2 the total number of cast-on stitches (so yes, for 44 stitches total, you would reserve 22 for the flap and for 40 stitches total, you would reserve 20 stitches for the heel flap).
Hope it helps.