Climb on the roof with an assistant. Give the assistant the tag-end of a measuring tape and have the assistant move to one end of the flat roof ridge as you move to the other end of the ridge.
Record the length of the ridge. Instruct your assistant to move downward along one of the ridges that goes from the flat roof ridge to the edge of the roof. Record the measurement.
Instruct your assistant to move across the roof to the lowest point of the ridge extending downward from the same point on the flat roof ridge. Record this measurement as well. Take the end of the tape from your assistant and measure the width of the shingles covering the roof ridge.
Add the length of all the ridges, both horizontal and sloping, together. Measure the length of a single tab of a three tab shingle. Divide the total length of the ridges by the length of the single shingle tab. The result is the number of shingles required to cover all of the ridges of a hip roof.