Genesis chapter 5 spans the generations from
Adam to Noah, which are "10" generations.
    Genesis chapter 11 spans the generations from
Shem to Terah, which are "9" generations.
    Matthew 1:17 reads; So all the generations from
Abraham to David are fourteen generations;
and from David until the carrying away into
Babylon are fourteen generations; and from the
carrying away into Babylon unto Christ 
are fourteen generations.