$ First$ $we$ $will$ $start$ $with$ $the$ $greatest$ $number,$ $9. $
$Clearly,$ $9$ $can't$ $be$ $in$ $the$ $middle$ $positions$ $ (second-ninth$ $digit), $ $so$ $we$ $have$ $two$ $spots(possibilities)$ $for$ $9$.
$Then$ $it$ $is$ $basically$ $the$ $same$ $problem$ $for$ $8,$ $so$ $two$ $possibilities$ $for$ $8$ $as$ $well,$ $same$ $for$ $7,6,5,4,3,2$ $and$ $1,$ $so$ $in$ $total$ $512$ $numbers$ $where$ $none$ $of$ $the$ $digits$ $are$ $high.$
$But,$ $we$ $also$ $counted$ $the$ $number$ $0123456789$ $which$ $has$ $no$ $high$ $digits$ $but$ $is$ $a$ $9$ $digit$ $number.$
$Thus,$ $the$ $answer$ $is$ $511.$