The first part confuses me too, so I'm afraid I can't help with that.
The (yf) twice is after the K2. Knit 2 stitches, then wrap the yarn around the needle twice, then knit your last stitch.
You should have enough stitches on your needle to do row 2 properly.
Row 1: K1 (1) K2tog (results in another 1) yf (1) K2 (2) yf twice (2) K1 (1). That results in the 8 stitches you need for row 2. The stitch count remains the same for row 3. Row 4 is a bit baffling until you realize that you use 3 stitches in casting off 2.
Just because I'm easily distracted doesn't mean I