Larger jobs are done by square footage, with some waste factored in (maybe 15%). You'd multiply the length and height of each rectangular area and add them up.
For small or spotty repairs, count the number of standard 12 foot lengths you'd need (by adding up short lengths if necessary). You don't really need to deal with square feet. The supplier will know how many come in a box and you can order an appropriate number of boxes.
Note that vinyl does tend to fade in the sunlight, so you may want to replace complete sections to avoid an odd appearance.