[Question]
  [
# Introduction
This is a very simple challenge: simply count the divisors of a number. We've had a [similar but more complicated challenge](https://codegolf.stackexchange.com/questions/11080/give-the-smallest-number-that-has-n-divisors) before, but I'm intending this one to be entry-level.
# The Challenge
Create a program or function that, given one strictly positive integer `N`, outputs or returns how many divisors it has, including 1 and `N`.
Input: One integer > 0. You may assume that the number can be represented in your language's native numeric type.
Output: The number of positive integer divisors it has, including 1 and the number itself.
Submissions will be scored in **bytes**. You may find [this website](http://bytesizematters.com) handy, though you may use any reasonable method for generating your byte count.
This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the lowest score wins!
**Edit:** It looks like FryAmTheEggman's 5-byte Pyth answer is the winner! Feel free to submit new answers, though; if you can get something shorter, I'll change the accepted answer. 
# Test Cases
```
ndiv(1) -> 1
ndiv(2) -> 2
ndiv(12) -> 6
ndiv(30) -> 8
ndiv(60) -> 12
ndiv(97) -> 2
ndiv(100) -> 9
```
# Leaderboards
Here is a Stack Snippet to generate both a regular leaderboard and an overview of winners by language.
To make sure that your answer shows up, please start your answer with a headline, using the following Markdown template:
```
# Language Name, N bytes
```
where `N` is the size of your submission. If you improve your score, you *can* keep old scores in the headline, by striking them through. For instance:
```
# Ruby, <s>104</s> <s>101</s> 96 bytes
```
If you want to include multiple numbers in your header (e.g. because your score is the sum of two files or you want to list interpreter flag penalties separately), make sure that the actual score is the *last* number in the header:
```
# Perl, 43 + 2 (-p flag) = 45 bytes
```
You can also make the language name a link which will then show up in the leaderboard snippet:
```
# [><>](http://esolangs.org/wiki/Fish), 121 bytes
```
```
var QUESTION_ID=64944,OVERRIDE_USER=45162;function answersUrl(e){return"http://api.stackexchange.com/2.2/questions/"+QUESTION_ID+"/answers?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+ANSWER_FILTER}function commentUrl(e,s){return"http://api.stackexchange.com/2.2/answers/"+s.join(";")+"/comments?page="+e+"&pagesize=100&order=desc&sort=creation&site=codegolf&filter="+COMMENT_FILTER}function getAnswers(){jQuery.ajax({url:answersUrl(answer_page++),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){answers.push.apply(answers,e.items),answers_hash=[],answer_ids=[],e.items.forEach(function(e){e.comments=[];var s=+e.share_link.match(/\d+/);answer_ids.push(s),answers_hash[s]=e}),e.has_more||(more_answers=!1),comment_page=1,getComments()}})}function getComments(){jQuery.ajax({url:commentUrl(comment_page++,answer_ids),method:"get",dataType:"jsonp",crossDomain:!0,success:function(e){e.items.forEach(function(e){e.owner.user_id===OVERRIDE_USER&&answers_hash[e.post_id].comments.push(e)}),e.has_more?getComments():more_answers?getAnswers():process()}})}function getAuthorName(e){return e.owner.display_name}function process(){var e=[];answers.forEach(function(s){var r=s.body;s.comments.forEach(function(e){OVERRIDE_REG.test(e.body)&&(r="<h1>"+e.body.replace(OVERRIDE_REG,"")+"</h1>")});var a=r.match(SCORE_REG);a&&e.push({user:getAuthorName(s),size:+a[2],language:a[1],link:s.share_link})}),e.sort(function(e,s){var r=e.size,a=s.size;return r-a});var s={},r=1,a=null,n=1;e.forEach(function(e){e.size!=a&&(n=r),a=e.size,++r;var t=jQuery("#answer-template").html();t=t.replace("{{PLACE}}",n+".").replace("{{NAME}}",e.user).replace("{{LANGUAGE}}",e.language).replace("{{SIZE}}",e.size).replace("{{LINK}}",e.link),t=jQuery(t),jQuery("#answers").append(t);var o=e.language;/<a/.test(o)&&(o=jQuery(o).text()),s[o]=s[o]||{lang:e.language,user:e.user,size:e.size,link:e.link}});var t=[];for(var o in s)s.hasOwnProperty(o)&&t.push(s[o]);t.sort(function(e,s){return e.lang>s.lang?1:e.lang<s.lang?-1:0});for(var c=0;c<t.length;++c){var i=jQuery("#language-template").html(),o=t[c];i=i.replace("{{LANGUAGE}}",o.lang).replace("{{NAME}}",o.user).replace("{{SIZE}}",o.size).replace("{{LINK}}",o.link),i=jQuery(i),jQuery("#languages").append(i)}}var ANSWER_FILTER="!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe",COMMENT_FILTER="!)Q2B_A2kjfAiU78X(md6BoYk",answers=[],answers_hash,answer_ids,answer_page=1,more_answers=!0,comment_page;getAnswers();var SCORE_REG=/<h\d>\s*([^\n,]*[^\s,]),.*?([\d.]+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/,OVERRIDE_REG=/^Override\s*header:\s*/i;
```
```
body{text-align:left!important}#answer-list,#language-list{padding:10px;width:290px;float:left}table thead{font-weight:700}table td{padding:5px}
```
```
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <link rel="stylesheet" type="text/css" href="//cdn.sstatic.net/codegolf/all.css?v=83c949450c8b"> <div id="answer-list"> <h2>Leaderboard</h2> <table class="answer-list"> <thead> <tr><td></td><td>Author</td><td>Language</td><td>Size</td></tr></thead> <tbody id="answers"> </tbody> </table> </div><div id="language-list"> <h2>Winners by Language</h2> <table class="language-list"> <thead> <tr><td>Language</td><td>User</td><td>Score</td></tr></thead> <tbody id="languages"> </tbody> </table> </div><table style="display: none"> <tbody id="answer-template"> <tr><td>{{PLACE}}</td><td>{{NAME}}</td><td>{{LANGUAGE}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr></tbody> </table> <table style="display: none"> <tbody id="language-template"> <tr><td>{{LANGUAGE}}</td><td>{{NAME}}</td><td>{{SIZE}}</td><td><a href="{{LINK}}">Link</a></td></tr></tbody> </table>
```
  
[Answer]
# Pyth, 5
```
l{yPQ
```
Uses the subsets operation on the prime factors of the input, then keeps only the unique lists of factors and returns this count.
[Test Suite](http://pyth.herokuapp.com/?code=l%7ByPQ&input=100&test_suite=1&test_suite_input=1%0A2%0A12%0A30%0A60%0A97%0A100&debug=0)
### Explanation
Using 25 as an example, so that the subset list isn't very long
```
l{yPQ     ## implicit:  Q = eval(input()) so Q == 25
   PQ     ## Prime factors of Q, giving [5, 5]
  y       ## All subsets, giving [[], [5], [5], [5, 5]]
 {        ## Unique-fiy, giving [[], [5], [5, 5]]
l         ## Length, print implicity
```
[Answer]
# ~~C++~~ C, ~~43~~ ~~57~~ ~~56~~ ~~46~~ 43 bytes
On Martin Büttner's suggestions :
```
i,c;f(n){for(i=c=n;i;n%i--&&--c);return c;}
```
[Answer]
## LabVIEW, 4938 Bytes
Well its obviously not suited for code golf but whatever, so for my first post and the lolz here goes. [![enter image description here](https://i.stack.imgur.com/picvL.jpg)](https://i.stack.imgur.com/picvL.jpg)
[Answer]
# [Haskell](https://www.haskell.org/), 28 bytes
```
f n=sum[0^mod n i|i<-[1..n]]
```
[Try it online!](https://tio.run/##FckxDoAgEATAr2xhC0FreQnBhKDoRTiJaOfbPeO0s4W2LzmLJLBtd3FmKscMBj00Ktdrzd5LCcSwqCfxhQ4lVCT8ORgvb0w5rE1UrPUD "Haskell – Try It Online")
The trick here is to test whether a remainder is `0` using the indicator function `0^`.
```
0^0 = 1
0^_ = 0
```
This works because any positive power of 0 is 0, whereas 0^0 is combinatorially the empty product of 1.
Compare this to filtering
```
f n=sum[1|i<-[1..n],mod n i<1]
```
---
**28 bytes**
```
f n=sum[1|0<-mod n<$>[1..n]]
```
[Try it online!](https://tio.run/##FckxDoAgDADAr3RghYCz@BHCQFCUSGsjuvl2a7z1ttT3pTWRAuT7jcE9dtR4zECjmoIzhmIUTJXAA5@VLlCAiaHAn4ON8ubS0tpFZ@YP "Haskell – Try It Online")
An alternative method using matching on a constant. The `<$>` infix `map` might postdate this challenge.
[Answer]
## Python 2, 37 bytes
```
f=lambda n,i=1:i/n or(n%i<1)+f(n,i+1)
```
A recursive function. The optional input `i` in the divisor being tested. The expression `(n%i<1)` tests divisibility, with `True` (which equals `1`) for divisors. The result is added to the recusive expression for `i+1`. When `i==n` is reached, the integer floor-division `i/n` evaluates to `1`, and that value is returned as the base case, accounting for `n` itself being a divisor of `n`.
---
**38:**
```
lambda n:sum(n%-~i<1for i in range(n))
```
An anonymous function. Tests all possible divisors `1` through `n`. This is shifted up from `0` through `n-1` in `range(n)` using `-~`, which adds `1`. Summing the bools uses the fact that Python treats `True`/`False` as `1`/`0`.
[Answer]
# [Dyalog APL](http://goo.gl/9KrKoM), ~~7~~ 6 [bytes](http://meta.codegolf.stackexchange.com/a/9429/43319)
```
≢∘∪⊢∨⍳
```
It is an unnamed function that can be named and then reused for each (`¨`) test case as follows:
```
      f ← ≢∘∪⊢∨⍳
      f¨ 1 2 12 30 60 97 100
1 2 6 8 12 2 9
```
Explanation:
```
 ┌─┴──┐  
 ∪  ┌─┼─┐
 ∘  │ ∨ │
 ̸≡  ⊢   ⍳
```
Count `≢` the `∘` unique `∪` of the GCD `∨` of itself `⊢` and each of the integers-until `⍳`.
Thanks to ngn for saving a byte.
---
Old version: `+/0=⍳|⊢`
This is how it works:
```
  ┌─┴─┐      
  / ┌─┼───┐  
┌─┘ 0 = ┌─┼─┐
+       ⍳ | ⊢
```
`⍳|⊢` 1-through-argument division-remainder argument  
`0=` Boolean if 0 is equal to the division rest  
`+/` Sum of the boolean, i.e. count of ones.
[Answer]
## [Retina](https://github.com/mbuettner/retina), 17 bytes
```
(?<=(.+))(?=\1*$)
```
[Input in unary](https://codegolf.meta.stackexchange.com/questions/5343/can-numeric-input-output-be-in-unary), output in decimal.
[Try it online.](http://retina.tryitonline.net/#code=KD88PSguKykpKD89XDEqJCk&input=MTExMTExMTExMTEx)
When invoked with a single regex, Retina simply counts the matches. The regex itself matches a *position*, where the unary number to the left of it is a divisor of the entire input. I'm also making use of the fact that lookarounds are atomic, so that I don't need to use a `^` anchor.
The first lookbehinds simply captures the entire prefix in group `1`. This can never fail, so after the lookbehind we know that's what's in group 1 and it won't change any more.
The lookahead then checks if we can reach the end of the string by repeating the captured string (our potential divisor) 0 or more times.
[Answer]
# J, 10 bytes
```
[:*/1+_&q:
```
This is an unnamed, monadic verb. It calculates **σ0(∏pkαk)** as **∏(αk + 1)**.
Try it online with [J.js](https://a296a8f7c5110b2ece73921ddc2abbaaa3c90d10.googledrive.com/host/0B3cbLoy-_9Dbb0NaSk9MRGE5UEU/index.html#code=(%20%5B%3A*%2F1%2B_%26q%3A%20)%20each%201%202%2012%2030%2060%2097%20100).
### How it works
```
[:*/1+_&q:    Right argument: y
      _&q:    Compute all exponents of the prime factorization of y.
    1+        Add 1 to each exponent.
[:*/          Reduce by mutiplication.
```
[Answer]
# Golfscript, ~~19~~ ~~18~~ ~~17~~ 13 bytes
With thanks to [Martin Büttner](http://chat.stackexchange.com/users/112128).
```
~.,\{\)%!}+,,
```
### How it works
```
~               Evaluate the input, n
 .,             Duplicate the input, create array [0..n-1]
   \            Swap array and n
    {    }+     Add n to block == {n block}
     \          Swap n with i in array
      )         Increment i
       %        n mod i
        !       Logical not so that 1 if divisible by n else 0
           ,    Filter array using block for all i divisible by n
            ,   Get length of the filtered array, the answer
```
### Also
From [@Peter Taylor](https://codegolf.stackexchange.com/users/194/peter-taylor), also in 13 bytes.
```
~:X,{)X\%!},,
```
### How it works
```
~               Evaluate the input
 :X             Store input in variable X
   ,            Create array [0..X-1]
    {     },    Filter array using the following block
     )          Increment i in array
      X\        Add X to stack, swap with i
        %       X mod i,
         !      Logical not so that 1 if divisible by n else 0
            ,   Get length of the filtered array, the answer
```
[Answer]
# Julia, 20 bytes
```
n->sum(i->n%i<1,1:n)
```
This is an anonymous function that works as follows: For each integer from 1 to the input, test whether the input modulo the integer is zero. If so, the value will be `true`, otherwise `false`. We sum over the booleans which are implicitly cast to integers, yielding the number of divisors.
---
A much cooler (though also much longer) solution, included for the sake of completeness, is
```
n->prod(collect(values(factor(n))).+1)
```
This gets the canonical factorization of `n`, i.e. `\prod_{i=1}^k p_i^e_i`, and computes the divisor function as `τ(n) = \prod_{i=1}^k e_i + 1`.
[Answer]
# J, ~~13~~ ~~12~~ 11 bytes
My first golf in J. I'm still learning it.
Saved a byte thanks to Dennis.
Saved one more byte thanks to randomra.
```
1+/@,0=i.|]
```
Explanation:
```
1+/@,0=i.|]
       i.        the array 0 .. n-1
         |]      mod n
     0=          replace 0 by 1, and nonzero entries by 0
1   ,            prepend 1 to the array
 +/@             take the sum
```
[Answer]
# [Arcyóu](https://github.com/nazek42/arcyou), 12 bytes
Let's get the party started!
```
(F(x)(_(d/ x
```
This uses the built-in function `d/`. Here's a version without the built-in (27 bytes):
```
(F(x)(](+(f i(_ 1 x)(‰ x i
```
Explanation:
```
(F(x)              ; Anonymous function with one parameter x
  (]               ; Increment
    (+             ; Sum
      (f i(_ 1 x)  ; For i in range from 1 to x-1 inclusive:
        (‰ x i     ; x divisible by i
```
[Answer]
## CJam, 11 bytes
```
ri_,:)f%0e=
```
[Test it here.](http://cjam.aditsu.net/#code=q~_%2C%3A)f%250e%3D&input=12)
### Explanation
CJam doesn't have a built-in for this, so we're doing trial division.
```
ri  e# Read input and convert to integer N.
_,  e# Duplicate and turn into range [0 1 ... N-1]
:)  e# Increment each element in the range to get [1 2 ... N]
f%  e# Take N modulo each of the list elements.
0e= e# Count the zeroes.
```
### Bonus
Here is an interesting solution at 12 bytes (which I suspect might be shortest in a language like J):
```
ri_)2m*::*e=
```
The result is equal to the number of times `n` appears in an `n x n` multiplication table:
```
ri  e# Read input and convert to integer N.
_)  e# Duplicate and increment.
2m* e# Take Cartesian product of [0 1 ... N] with itself.
::* e# Compute the product of each pair.
e=  e# Count the occurrences of N.
```
[Answer]
# Matlab, 20 bytes
Perform `k mod n` for every `k = 1,...,n`, then perform `not` (which turns every nonzer to zero and every zero to 1) and sum up all those values.
```
@(n)sum(~mod(n,1:n))
```
[Answer]
# Excel Formula, ~~42~~ 28 bytes
Edit: I just realised I do not need to use `INDIRECT`, saving 14 bytes!
The following should be entered as an array formula (`Ctrl`+`Shift`+`Enter`):
```
=SUM(--NOT(MOD(N,ROW(1:N))))
```
Where N is the number to test.
**Examples:**
```
{SUM(--NOT(MOD(32,ROW(1:32))))}
Result: 6
{SUM(--NOT(MOD(144,ROW(1:144))))}
Result: 15
```
**Explanation:**
```
SUM(--NOT(MOD(N,ROW(1:N))))       Full formula
                ROW(1:N)          Generates an array of row numbers e.g {1;2;3;4;...N}
          MOD(N,ROW(1:N))         Does N MOD {1;2;3;4;,...N}
      NOT(MOD(N,ROW(1:N)))        Coerces zeros to ones, so that they may be counted, but actually returns an array of TRUE;FALSE;FALSE;...
    --NOT(MOD(N,ROW(1:N)))        Coerces the TRUEs to 1s and FALSEs to 0s.
SUM(--NOT(MOD(N,ROW(1:N))))       Sum the ones for the result.
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E/wiki/Commands), 2 [bytes](https://github.com/Adriandmen/05AB1E/wiki/Codepage)
```
Ñg
```
[Try it online](https://tio.run/##yy9OTMpM/f//8MT0//8NDQwA) or [verify all test cases](https://tio.run/##yy9OTMpM/V9Waa@k8KhtkoKSfeX/wxPT/@v8jzbUMdIxNNIxNtAxM9CxNNcxNDCIBQA).
**Explanation:**
Pretty straight-forward, but here it is anyway:
```
Ñ   # Push a list of divisors of the (implicit) input-integer
    #  i.e. 100 → [1,2,4,5,10,20,25,50,100]
 g  # Pop and push the length of this list
    #  i.e. [1,2,4,5,10,20,25,50,100] → 9
    # (which is output implicitly as result)
```
[Answer]
# [Jelly](//github.com/DennisMitchell/jelly), 2 bytes
```
Æd
```
[Try it online!](//jelly.tryitonline.net#code=w4Zk&args=NjA)
I *think* this uses features implemented after the other Jelly answer. Comment if I'm wrong though (I can't look each commit in the row, you know :))
[Answer]
# PARI/GP, 6 bytes
PARI/GP have a built-in for this.
```
numdiv
```
[Answer]
# Pyth, 8 bytes
Simple trial division.
```
lf!%QTSQ
```
[Try it online here](http://pyth.herokuapp.com/?code=lf%21%25QTSQ&input=12&test_suite=1&test_suite_input=1%0A2%0A12%0A30%0A60%0A97%0A100&debug=0).
[Answer]
# Ruby, 27 bytes
```
->n{(1..n).count{|i|n%i<1}}
```
Sample run:
```
2.1.5 :001 > ->n{(1..n).count{|i|n%i<1}}[100]
 => 9 
```
[Answer]
# Octave, ~~21~~ 20 bytes
```
@(n)nnz(~mod(n,1:n))
```
[Answer]
# Regex (.NET), 33 bytes
```
^((?=.*$(?<=^\2*(.+?(?>\2?)))).)+
```
Assuming input and output are in unary, and the output is taken from the main match of the regex.
Break down of the regex:
* `.*$` ets the pointer to the end of the string so that we have the whole input x in one direction.
* `(?<=^\2*(.+?(?>\2?)))` matches from right to left and checks for divisor by looping from x to 0.
	+ `(.+?(?>\2?))` is a "variable" which starts from 1 in the first iteration and continues from the number in previous iteration and loops up to x.
	+ `^\2*` checks whether x is a multiple of "variable".
It basically has the same idea as my answer to [Calculate Phi (not Pi)](https://codegolf.stackexchange.com/questions/63710/calculate-phi-not-pi/63738#63738). Only the check is different.
Test the regex at [RegexStorm](http://regexstorm.net/tester).
[Answer]
## [Labyrinth](https://github.com/mbuettner/labyrinth), 33 bytes
```
?:}
  :{:}%{{
@ }   " )
!{("{;"}}
```
[Try it online.](http://labyrinth.tryitonline.net/#code=Pzp9CiAgOns6fSV7ewpAIH0gICAiICkKIXsoIns7In19&input=MTI)
This implements trial division. I'll add a full explanation later. It's probably not optimal, but I'm having a hard time coming up with something shorter.
[Answer]
## [Perl 6](http://perl6.org), 17 bytes
```
{[+] $_ X%%1..$_} # 17
```
usage:
```
say {[+] $_ X%%1..$_}(60); # 12␤
my $code = {[+] $_ X%%1..$_};
say $code(97); # 2␤
my &code = $code;
say code 92; # 6
```
[Answer]
# Javascript (ES6), ~~60~~ ~~57~~ ~~42~~ ~~40~~ ~~39~~ 37 bytes
This can probably be golfed better.
```
n=>{for(d=i=n;i;n%i--&&d--);return d}
```
**Edit 1:** I was right. Removed the braces after the for loop.
**Edit 2:** Golfed to 40 bytes with thanks to [manatwork](https://codegolf.stackexchange.com/users/4198/manatwork) and [Martin Büttner](https://codegolf.stackexchange.com/users/8478/martin-b%C3%BCttner).
**Edit 3:** Saving a byte by basing the function on [the C answer above.](https://codegolf.stackexchange.com/a/64978/47581)
**Edit 4:** Thanks to [ןnɟuɐɯɹɐןoɯ](https://codegolf.stackexchange.com/users/41247/%D7%9Fn%C9%9Fu%C9%90%C9%AF%C9%B9%C9%90%D7%9Fo%C9%AF) and [Neil](https://codegolf.stackexchange.com/users/17602/neil), but I can't get the eval to work.
**Edit 5:** Forgot to remove the eval.
### Test
```
n = <input type="number" oninput='result.innerHTML=(
n=>{for(d=i=n;i;n%i--&&d--);return d}
)(+this.value)' /><pre id="result"></pre>
```
[Answer]
# PowerShell, 34 bytes
```
param($x)(1..$x|?{!($x%$_)}).Count
e.g. 
PS C:\temp> .\divisors-of-x.ps1 97
2
```
* create a list of numbers from 1 to x, feed them into the pipeline `|`
* filter the pipeline on (x % item == 0), by implicitly casting the modulo result as a boolean and then inverting it using `!` so divisors become $true and are allowed through; using the builtin alias `?` for `Where-Object`
* gather up `()` and `.Count` how many items got through the filter
[Answer]
# Taxi, 2143 bytes
```
Go to Post Office:w 1 l 1 r 1 l.Pickup a passenger going to The Babelfishery.Go to The Babelfishery:s 1 l 1 r.Pickup a passenger going to Cyclone.Go to Cyclone:n 1 l 1 l 2 r.Pickup a passenger going to Cyclone.Pickup a passenger going to Sunny Skies Park.Go to Sunny Skies Park:n 1 r.Go to Cyclone:n 1 l.Pickup a passenger going to Firemouth Grill.Pickup a passenger going to Joyless Park.Go to Firemouth Grill:s 1 l 2 l 1 r.Go to Joyless Park:e 1 l 3 r.[i][Check next value n-i]Go to Zoom Zoom:w 1 r 2 l 2 r.Go to Sunny Skies Park:w 2 l.Pickup a passenger going to Cyclone.Go to Cyclone:n 1 l.Pickup a passenger going to Divide and Conquer.Pickup a passenger going to Sunny Skies Park.Go to Joyless Park:n 2 r 2 r 2 l.Pickup a passenger going to Cyclone.Go to Sunny Skies Park:w 1 r 2 l 2 l 1 l.Go to Cyclone:n 1 l.Pickup a passenger going to Joyless Park.Pickup a passenger going to Divide and Conquer.Go to Divide and Conquer:n 2 r 2 r 1 r.Pickup a passenger going to Cyclone.Go to Cyclone:e 1 l 1 l 2 l.Pickup a passenger going to Trunkers.Pickup a passenger going to Equal's Corner.Go to Trunkers:s 1 l.Pickup a passenger going to Equal's Corner.Go to Equal's Corner:w 1 l.Switch to plan "F" if no one is waiting.Pickup a passenger going to Knots Landing.Go to Firemouth Grill:n 3 r 1 l 1 r.Pickup a passenger going to The Underground.Go to The Underground:e 1 l.Pickup a passenger going to Firemouth Grill.Go to Knots Landing:n 2 r.Go to Firemouth Grill:w 1 l 2 r.Go to Joyless Park:e 1 l 3 r.Switch to plan "N".[F][Value not a divisor]Go to Joyless Park:n 3 r 1 r 2 l 4 r.[N]Pickup a passenger going to The Underground.Go to The Underground:w 1 l.Switch to plan "E" if no one is waiting.Pickup a passenger going to Joyless Park.Go to Joyless Park:n 1 r.Switch to plan "i".[E]Go to Sunny Skies Park:n 3 l 2 l 1 l.Pickup a passenger going to What's The Difference.Go to Firemouth Grill:s 1 l 1 l 1 r.Pickup a passenger going to What's The Difference.Go to What's The Difference:w 1 l 1 r 2 r 1 l.Pickup a passenger going to The Babelfishery.Go to The Babelfishery:e 3 r.Pickup a passenger going to Post Office.Go to Post Office:n 1 l 1 r.
```
[Try it online!](https://tio.run/nexus/taxi#rVZNj5swEP0ro1x6Ktpke8qx2WSlttpGSj@kRhxcGIKFd5y1zdL8@tTGbAqEdUPaAyDsmeeZNzMPjvcSjIS11AY@ZxlPcF7BFIS9lHtGa54U5R4Y7JnWSDtUsJOcds7rS47wnv1EkXGdozpEHqy/PNcviEG0xSERkrABad7m1PgKmF3oH7LZlEQH2BQcNayZKprD@sv1qWookiD6iit8lKXJ4V5xEbb9IA8CdSeKnntD26yhztu03eZYG9zazS2Pt4sckwIIfxl4ZqJEoLc89l4/pHysb3VxVY05O2GeZV85g2trFfS74888RWCUwkLSU4nqmnJ1SCCXSXONCXog6z/U1B03OrtOTUfS4M8632jld90AYWuA/jLOqqQClQ4aLZ9KJt5oG56iU9gvnr5lx/t3F70CRZuKmyR323vBCCarCfAMSILNCriGinFjQYOnfSRpNHyyfDrL4TEjN0EXKZQTtq@UotopWVLakrvWqid8lE54nE6svuyvRFyd9DAoCn0CHybRdhVvv3lxkMYGl9p@01LFg3PlafEj8c6JzEP87@wM13Z5RW0HFLSXwHSABG5JWMavyv5ta/xDh3/PmbEN67K741mGCinBoI5f0mAh1MG91sd69h8/2Fj3Twip9cMQnf9C0Cnb43F6c/Mb)
Ungolfed:
```
Go to Post Office: west 1st left 1st right 1st left.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery: south 1st left 1st right.
Pickup a passenger going to Cyclone.
Go to Cyclone: north 1st left 1st left 2nd right.
Pickup a passenger going to Cyclone.
Pickup a passenger going to Sunny Skies Park.
Go to Sunny Skies Park: north 1st right.
Go to Cyclone: north 1st left.
Pickup a passenger going to Firemouth Grill.
Pickup a passenger going to Joyless Park.
Go to Firemouth Grill: south 1st left 2nd left 1st right.
Go to Joyless Park: east 1st left 3rd right.
[i]
[Check next value n-i]
Go to Zoom Zoom: west 1st right 2nd left 2nd right.
Go to Sunny Skies Park: west 2nd left.
Pickup a passenger going to Cyclone.
Go to Cyclone: north 1st left.
Pickup a passenger going to Divide and Conquer.
Pickup a passenger going to Sunny Skies Park.
Go to Joyless Park: north 2nd right 2nd right 2nd left.
Pickup a passenger going to Cyclone.
Go to Sunny Skies Park: west 1st right 2nd left 2nd left 1st left.
Go to Cyclone: north 1st left.
Pickup a passenger going to Joyless Park.
Pickup a passenger going to Divide and Conquer.
Go to Divide and Conquer: north 2nd right 2nd right 1st right.
Pickup a passenger going to Cyclone.
Go to Cyclone: east 1st left 1st left 2nd left.
Pickup a passenger going to Trunkers.
Pickup a passenger going to Equal's Corner.
Go to Trunkers: south 1st left.
Pickup a passenger going to Equal's Corner.
Go to Equal's Corner: west 1st left.
Switch to plan "F" if no one is waiting.
Pickup a passenger going to Knots Landing.
Go to Firemouth Grill: north 3rd right 1st left 1st right.
Pickup a passenger going to The Underground.
Go to The Underground: east 1st left.
Pickup a passenger going to Firemouth Grill.
Go to Knots Landing: north 2nd right.
Go to Firemouth Grill: west 1st left 2nd right.
Go to Joyless Park: east 1st left 3rd right.
Switch to plan "N".
[F]
[Value not a divisor]
Go to Joyless Park: north 3rd right 1st right 2nd left 4th right.
[N]
Pickup a passenger going to The Underground.
Go to The Underground: west 1st left.
Switch to plan "E" if no one is waiting.
Pickup a passenger going to Joyless Park.
Go to Joyless Park: north 1st right.
Switch to plan "i".
[E]
Go to Sunny Skies Park: north 3rd left 2nd left 1st left.
Pickup a passenger going to What's The Difference.
Go to Firemouth Grill: south 1st left 1st left 1st right.
Pickup a passenger going to What's The Difference.
Go to What's The Difference: west 1st left 1st right 2nd right 1st left.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery: east 3rd right.
Pickup a passenger going to Post Office.
Go to Post Office: north 1st left 1st right.
```
Explanation:
```
Convert stdin to a number and store it in three locations for three purposes:
   Original (Sunny Skies Park)
   Counter for tested values (Joyless Park)
   Counter for divisors found (Firemouth Grill)
Divide the original by each Joyless Park value in turn.
If the division result equals the truncated division result, then it's a divisor.
When a divisor is found, subtract one from Firemouth Grill.
Repeat until Joyless Park hits zero.
Pickup the original from Sunny Skies Park and subtract the value from Firemouth Grill.
Convert the result to a string and print to stdout.
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 3 bytes
```
â l
```
`-m` flag is for running all the test cases.
[Try it](https://petershaggynoble.github.io/Japt-Interpreter/?v=1.4.6&flags=LW0&code=4iBs&input=WzEsCjIsCjEyLAozMCwKNjAsCjk3LAoxMDBd)
[Answer]
# TI-BASIC, 14 bytes
```
sum(not(fPart(Ans/cumSum(binomcdf(Ans-1,0
```
Input is in `Ans`.  
Output is in `Ans` and is implicitly printed.
This submission will only work for \$1<N<1000\$ due to limitations in the TI calculators.
**Examples:**
```
25
              25
prgmCDGF14
               3
100
             100
prgmCDGF14
               9
```
**Explanation:**
```
sum(not(fPart(Ans/cumSum(binomcdf(Ans-1,0   ;full program
                         binomcdf(Ans-1,0   ;generate a list of 1s whose length is the input
                  cumSum(                   ;calculate the cumulative sum
              Ans/                          ;divide the input by each term
        fPart(                              ;get the fractional part of each element
    not(                                    ;logically negate each term
                                            ; 0 becomes 1
                                            ; everything else becomes 0
sum(                                        ;sum the list
                                            ;implicit print of "Ans"
```
---
If the above submission does not suffice, then the following **24 byte** submission also works for \$0<N<10^{100}\$
```
Ans→N:0:For(I,1,N:Ans+not(fPart(N/I:End:Ans
```
**Examples:**
```
25
              25
prgmCDGF14
               3
100
             100
prgmCDGF14
               9
```
**Explanation:**
```
Ans→N:0:For(I,1,N:Ans+not(fPart(N/I:End:Ans   ;full program
Ans→N                                         ;store the input in "N"
      0                                       ;leave 0 in "Ans"
        For(I,1,N                   End       ;loop over all integers in [1,N]
                  Ans+not(fPart(N/I           ;increment "Ans" if the current "I"
                                              ; is a factor of "N"
                                        Ans   ;leave "Ans" as the last expression
                                              ;implicit print of "Ans"
```
---
**Note:** TI-BASIC is a tokenized language. Character count does ***not*** equal byte count.
[Answer]
# [cQuents](https://github.com/stestoltz/cQuents), 3 bytes
```
Lz$
```
[Try it online!](https://tio.run/##Sy4sTc0rKf7/36dK5f9/QyMA "cQuents – Try It Online")
## Explanation
```
:Lz$
:       (implicit) given input n, output nth term in sequence
          each term in sequence equals:
 L                                      length (                    )
  z                                              divisors (       )
   $                                                        index
```
]