The new sts are picked up along the edge as you say. When you're finished picking up, you'll have 32sts (more or less) on your needle. Those are the sts that you begin working in k1,p1 rib so you don't have to attach them to anything. They're attached when you pick them up. Take a look at the video on picking up sts and you'll see how that works.
32sts in k1p1 ribbing is going to pull in and be tighter than sts in stockinette so 32 may be ok. If it seems like too many, pick up fewer sts for the leg opening. The idea is to make the opening snug up on the baby's leg and not be loose or ruffley.