angular material show drop down count base on radio button

I have a radio button which allows a user to choose a type of fruit.

If user chooses banana I need to show the count from 1 to 8. If the user chooses apple I have to show the count 2 to 8 in drop down, but we have to set the default value as last count chosen.

Below is my code kindly help me to solve this issue. I expect the answer will be based on changes to the data model.

<html lang = "en">
          <link rel = "stylesheet"
             href = "">
          <script src = ""></script>
          <script src = ""></script>
          <script src = ""></script>
          <script src = ""></script>
          <script src = ""></script>
          <link rel = "stylesheet" href = "">
          <script language = "javascript">
                .module('firstApplication', ['ngMaterial'])
                .controller('inputController', inputController);
             function inputController ($scope) {
    		 $scope.chooseValue =false;
                $scope.project = {
                   comments: 'Comments',    
    			$scope.showdata2 = function(value){
    			 if (value) {
                      $scope.fruitCount = true;
                  } else {
                      $scope.fruitCount = false;
       <body ng-app = "firstApplication"> 
          <div id = "inputContainer" class = "inputDemo"
             ng-controller = "inputController as ctrl" ng-cloak>
             <form role="form" name="chooseFruitForm">
                        <div style="margin-top:25px;">
                            <h5 sstyle="margin-top:20px; color: rgba(0, 0, 0, 0.87);font-size:14px;">do you want this fruit?</h5>
                            <md-input-container style="margin-top:10px;">
                                <md-radio-group class="md-primary" md-ink-ripple="false" layout="row">
                                    <md-radio-button value="true" ng-click="showdata2(true)">banana</md-radio-button>
                                    <md-radio-button value="false" ng-click="showdata2(false)">apple</md-radio-button>
                            <md-input-container style="width:100%;padding: 0;margin-bottom: 15px;">
                                <label>fruit Count</label>
                                <md-select ng-model="">
                                    <md-option ng-value="fruitcount" ng-repeat="fruitcount in [1,2,3,4,5,6,7,8]">{{fruitcount}}</md-option>