code: function figureOfNumber(number, figure) {
          if (isNumber(number) && isInteger(number) &&
              isNumber(figure) && isInteger(figure) &&
              figure >= 0 && figure <= 9) {
              var count = 0;
              var stringNumber = numberToString(number);
              var stringFigure = numberToString(figure);
              for (var i = 0; i < stringNumber.length; i++) {
                  if (stringNumber[i] === stringFigure) {
                      count++;
                  }
              }
              return count;
          }
          else {
              return false;
          }
      }
docs: Example: number = 12321; figure = 1; return = 2;