[Question]
  [
The program should take input the number, the start of the range and the end of the range, and output how many integers the number appears between the start and end of the range, **inclusive**. Both programs and functions are allowed.
## Example Inputs
For example:
```
//Input example 1
3,1,100
//Input example 2
3
1
100
//Input example 3
3 1 100
//Input example 4
a(3, 1, 100);
```
All the above four input examples are valid and all of them mean that `3` is the number in question, `1` is the beginning of the range and `100` the the end of the range.
And then the program should output how many times `3` appears in the range from `1` to `100` **inclusive**. `3` appears in the integers `3`, `13`, `23`, `30`, `31`, `32`, `33`, ..., `93` at a total of 19 times. So the program should output `19` as the output because that is how many times `3` appears in the range from `1` to `100`.
## Rules
* Both programs and functions are allowed.
* All numbers will be integers, meaning that there will **not** be any `float`s or `double`s.
* Note: the sought number will always be in the range `0≤x≤127`. There will be **no** cases where it will be outside this `0≤x≤127` range.
* As in the first example, with the case as `33`, the number `3` will be counted as appearing only **once**, **not** twice.
* The values of the start and end of the range will be between `-65536` and `65535` inclusive.
* The value of range's start will never exceed or equal to range's end. `start < end`
* Also the range is inclusive. For example if the input was `8 8 10`, the range would be `8≤x≤10` and hence the output will be 1.
* Input can be taken in any of the ways shown in the examples. Input can be taken as a string or as a number, any way you wish.
## Test Cases
```
3 1 100
19
3 3 93
19
12,-200,200
24          //This is because 12 appears in -129, -128, ..., -112, -12, 12, 112, 120, 121, 122, ...
123,1,3
0           //This is because all of 123's digits have to appear in the same order
3 33 34
2           //Because 3 appears in 2 numbers: 33 and 34
a(0,-1,1);
1
$ java NotVerbose 127 -12 27
0
```
# Snack Snippet
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 there 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
```
```
/* Configuration */
var QUESTION_ID = 98470; // Obtain this from the url
// It will be like https://XYZ.stackexchange.com/questions/QUESTION_ID/... on any question page
var ANSWER_FILTER = "!t)IWYnsLAZle2tQ3KqrVveCRJfxcRLe";
var COMMENT_FILTER = "!)Q2B_A2kjfAiU78X(md6BoYk";
var OVERRIDE_USER = 41805; // This should be the user ID of the challenge author.
/* App */
var answers = [], answers_hash, answer_ids, answer_page = 1, more_answers = true, comment_page;
function answersUrl(index) {
  return "https://api.stackexchange.com/2.2/questions/" +  QUESTION_ID + "/answers?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + ANSWER_FILTER;
}
function commentUrl(index, answers) {
  return "https://api.stackexchange.com/2.2/answers/" + answers.join(';') + "/comments?page=" + index + "&pagesize=100&order=desc&sort=creation&site=codegolf&filter=" + COMMENT_FILTER;
}
function getAnswers() {
  jQuery.ajax({
    url: answersUrl(answer_page++),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      answers.push.apply(answers, data.items);
      answers_hash = [];
      answer_ids = [];
      data.items.forEach(function(a) {
        a.comments = [];
        var id = +a.share_link.match(/\d+/);
        answer_ids.push(id);
        answers_hash[id] = a;
      });
      if (!data.has_more) more_answers = false;
      comment_page = 1;
      getComments();
    }
  });
}
function getComments() {
  jQuery.ajax({
    url: commentUrl(comment_page++, answer_ids),
    method: "get",
    dataType: "jsonp",
    crossDomain: true,
    success: function (data) {
      data.items.forEach(function(c) {
        if (c.owner.user_id === OVERRIDE_USER)
          answers_hash[c.post_id].comments.push(c);
      });
      if (data.has_more) getComments();
      else if (more_answers) getAnswers();
      else process();
    }
  });  
}
getAnswers();
var SCORE_REG = /<h\d>\s*([^\n,]*[^\s,]),.*?(\d+)(?=[^\n\d<>]*(?:<(?:s>[^\n<>]*<\/s>|[^\n<>]+>)[^\n\d<>]*)*<\/h\d>)/;
var OVERRIDE_REG = /^Override\s*header:\s*/i;
function getAuthorName(a) {
  return a.owner.display_name;
}
function process() {
  var valid = [];
  
  answers.forEach(function(a) {
    var body = a.body;
    a.comments.forEach(function(c) {
      if(OVERRIDE_REG.test(c.body))
        body = '<h1>' + c.body.replace(OVERRIDE_REG, '') + '</h1>';
    });
    
    var match = body.match(SCORE_REG);
    if (match)
      valid.push({
        user: getAuthorName(a),
        size: +match[2],
        language: match[1],
        link: a.share_link,
      });
    
  });
  
  valid.sort(function (a, b) {
    var aB = a.size,
        bB = b.size;
    return aB - bB
  });
  var languages = {};
  var place = 1;
  var lastSize = null;
  var lastPlace = 1;
  valid.forEach(function (a) {
    if (a.size != lastSize)
      lastPlace = place;
    lastSize = a.size;
    ++place;
    
    var answer = jQuery("#answer-template").html();
    answer = answer.replace("{{PLACE}}", lastPlace + ".")
                   .replace("{{NAME}}", a.user)
                   .replace("{{LANGUAGE}}", a.language)
                   .replace("{{SIZE}}", a.size)
                   .replace("{{LINK}}", a.link);
    answer = jQuery(answer);
    jQuery("#answers").append(answer);
    var lang = a.language;
    if (/<a/.test(lang)) lang = jQuery(lang).text();
    
    languages[lang] = languages[lang] || {lang: a.language, user: a.user, size: a.size, link: a.link};
  });
  var langs = [];
  for (var lang in languages)
    if (languages.hasOwnProperty(lang))
      langs.push(languages[lang]);
  langs.sort(function (a, b) {
    if (a.lang > b.lang) return 1;
    if (a.lang < b.lang) return -1;
    return 0;
  });
  for (var i = 0; i < langs.length; ++i)
  {
    var language = jQuery("#language-template").html();
    var lang = langs[i];
    language = language.replace("{{LANGUAGE}}", lang.lang)
                       .replace("{{NAME}}", lang.user)
                       .replace("{{SIZE}}", lang.size)
                       .replace("{{LINK}}", lang.link);
    language = jQuery(language);
    jQuery("#languages").append(language);
  }
}
```
```
body { text-align: left !important}
#answer-list {
  padding: 10px;
  width: 290px;
  float: left;
}
#language-list {
  padding: 10px;
  width: 290px;
  float: left;
}
table thead {
  font-weight: bold;
}
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]
# Bash, 20 bytes
the obvious answer
```
seq $2 $3|grep -c $1
```
example
```
$ bash golf 3 1 100
19
```
[Answer]
# [05AB1E](http://github.com/Adriandmen/05AB1E), 6 bytes
Input in the form: **upper bound**, **lower bound**, **number**.
```
Ÿvy³åO
```
Explanation:
```
Ÿ       # Inclusive range, [a, ..., b]
 vy     # For each element...
   ³å   # Check if the third input is a substring of the number
     O  # Sum up the results
```
Uses the **CP-1252** encoding. [Try it online!](http://05ab1e.tryitonline.net/#code=xbh2ecKzw6VP&input=MjAwCi0yMDAKMTI)
[Answer]
## Perl, 20 bytes
*Saved 2 bytes by using `grep` as in @ardnew's [answer](https://codegolf.stackexchange.com/a/98490/55508).*
Bytecount includes 18 bytes of code and `-ap` flags.
```
$_=grep/@F/,<>..<>
```
Give the 3 numbers on three separate lines :
```
perl -ape '$_=grep/@F/,<>..<>' <<< "3
1
100"
```
[Answer]
# Python 2, ~~47~~ 43 Bytes
Relatively straightforward, making use of Python 2's `repr` short-form.
```
f=lambda n,a,b:a<b and(`n`in`a`)+f(n,-~a,b)
```
Ouput:
```
f(  3,    1, 100) -> 19
f(  3,    3,  93) -> 19
f( 12, -200, 200) -> 24
f(123,    1,   3) -> 0
f(  3,   33,  34) -> 2
f(  0,   -1,   1) -> 1
f(127,   12,  27) -> 0
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), ~~7~~ 6 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
-1 thanks to [caird coinheringaahing](https://codegolf.stackexchange.com/users/66833/caird-coinheringaahing)! (Use `w` and filtering to avoiding `@`.)
```
rAwƇ⁵L
```
**[TryItOnline!](https://tio.run/##y0rNyan8/7/IsfxY@6PGrT7////XNTIw@A/ChkYA "Jelly – Try It Online")**
Input: Start, End, ToFind
### How?
```
rAwƇ⁵L - Main link: Start, End, ToFind
r      - range: [Start, ..., End]
 A     - absolute values
    ⁵  - third input: ToFind
   Ƈ   - filter keep those (absolute values, a) for which:
  w    -   first index of sublist (implicit digits of ToFind) in (implicit digits of a)
     L - length
```
The default casting of an integer to an iterable for the sublist existence check casts to a decimal list (not a character list), so negative numbers have a leading negative value (e.g. `-122`->`[-1,2,2]` which won't find a sublist of `[1,2]`) so taking the absolute value first seems like the golfiest solution.
[Answer]
## JavaScript (ES6), ~~46~~ 45 bytes
```
f=(n,s,e)=>s<=e&&!!`${s++}`.match(n)+f(n,s,e)
```
(My best nonrecursive version was 61 bytes.) Edit: Saved 1 byte thanks to @edc65.
[Answer]
## PowerShell v2+, ~~64~~ ~~62~~ 56 bytes
```
param($c,$a,$b)$(for(;$a-le$b){1|?{$a++-match$c}}).count
```
*-6 bytes thanks to mazzy*
Input via command-line arguments of the form **number lower\_bound upper\_bound**. A little goofy on the notation, because of the semicolons inside the `for` causing parse errors if it's not surrounded in `$(...)` to create a script block. We basically loop upward through `$a` until we hit `$b`, using `Where-Object` (the `|?{...}`) to pull out those numbers that regex `-match` against `$c`. That's encapsulated in parens, we take the `.count` thereof, and that's left on the pipeline and output is implicit.
---
If, however, we guarantee that the range will be no more than 50,000 elements, we can skip the loop and just use the range operator `..` directly, for **~~45~~ 43 bytes**. Since that's not in the challenge specifications, though, this isn't valid. Bummer.
```
param($c,$a,$b)($a..$b|?{$_-match$c}).count
```
[Answer]
# Vim, ~~46~~, 41 bytes
```
C<C-r>=r<tab><C-r>")<cr><esc>jC0<esc>:g/<C-r>"/norm G<C-v><C-a>
kd{
```
Input is in this format:
```
1, 100
3
```
[Answer]
## Haskell, 65 bytes
```
import Data.List
(s#e)i=sum[1|x<-[s..e],isInfixOf(show i)$show x]
```
The `import` ruins the score. Usage example: `((-200)#200)12` -> `24`.
[Answer]
# Java 7 85 bytes
```
int x(int a,int b,int c){int t=0;for(;b<=c;)if((b+++"").contains(a+""))t++;return t;}
```
[Answer]
# Swift 3, ~~96~~ 93 bytes
```
import Cocoa
func c(n:Int,s:Int,e:Int){print((s...e).filter{"\($0)".contains("\(n)")}.count)}
```
**Edit 1:**
Saved 3 bytes by using shorthand parameters
[Answer]
# Scala, 50 bytes
```
(c:String)=>(_:Int)to(_:Int)count(""+_ contains c)
```
takes the first input curried; call it like this: `f("12")(-200,200)` 
Explantion:
```
(c:String)=>  //define an anonymous function taking a string parameter
  (_:Int)     //create a range from an anonymous int parameter
  to          //to
  (_:Int)     //another anonymous int parameter
  count(      //and count how many...
   ""+_       //elements converted to a string
   contains c //contain c
  )
```
[Answer]
# R, 32 bytes
Quite straightforward:
```
function(a,b,c)sum(grepl(a,b:c))
```
[Answer]
# C#, 71 bytes
Beat my Java answer thanks to lambdas
```
(t,l,u)=>{int d=0;for(;l<=u;)if((l+++"").Contains(t+""))d++;return d;};
```
[Answer]
# Ruby 44 bytes
```
m=->(n,s,f){(s..f).count{|x|x.to_s[/#{n}/]}}
```
Test Cases:
```
m.(3,1,100)     #=> 19
m.(3,3,93)      #=> 19
m.(12,-200,200) #=> 24
m.(123,1,3)     #=>  0
m.(3,33,34)     #=>  2
m.(0,-1,1)      #=>  1
m.(127,-12,27)  #=>  0
```
[Answer]
# PHP, 62 bytes
Pretty straight forward approach:
```
<?=count(preg_grep('/'.($a=$argv)[1].'/',range($a[2],$a[3])));
```
[Try it online](https://3v4l.org/3BBoO)
[Answer]
# C, ~~143~~ 135 bytes
Thanks to @Kritixi Lithos for helping save 8 bytes
Surely this can be done better, but its the best I've got for now. C doesn't handle strings very gracefully, so naturally it takes quite a few operations.
```
int C(int N,int l,int h){char b[99],n[99];int t=0,i=1;sprintf(n,"%d",N);for(;i<=h;i++){sprintf(b,"%d",i);if(strstr(b,n))++t;}return t;}
```
**Ungolfed + program**
```
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
int C(int N,int l,int h)
{
    char b[99], n[99];
    int t=0,i=1;
    sprintf(n,"%d",N);
    for(;i<=h;i++)
    {
        sprintf(b,"%d",i);
        if(strstr(b,n))
            ++t;
    }
    return t;
}
int main()
{
  printf("%d\n", C(3, 1, 100));
}
```
[Answer]
# JavaScript, ~~46~~ 45 bytes
```
f=(i,s,e)=>s>e?0:RegExp(i).test(s)+f(i,++s,e)
```
Recursively count until start > end
Edit: Switch to RegExp test to save a byte
[Answer]
# PHP, ~~68~~ 63 bytes
```
for($a=$argv;$a[2]<=$a[3];)$o+=strstr($a[2]++,$a[1])>'';echo$o;
```
use like:
```
 php -r "for($a=$argv;$a[2]<=$a[3];)$o+=strstr($a[2]++,$a[1])>'';echo$o;" 3 1 100
```
edit: 5 bytes saved thanks to Titus
[Answer]
# Powershell, 48 bytes
According to the rule, the range can contain more than 50,000 elements. So we can't use the range operator `..` directly. Thanks [AdmBorkBork](https://codegolf.stackexchange.com/a/98478/80745).
Straightforward:
```
param($c,$a,$b)for(;$a-le$b){$i+=$a++-match$c}$i
```
Test script:
```
$f = {
param($c,$a,$b)for(;$a-le$b){$i+=$a++-match$c}$i
}
@(
    ,(19, 3,1,100)
    ,(19, 3,3,93)
    ,(24, 12,-200,200)
    ,(0, 123,1,3)
    ,(2, 3,33,34)
    ,(1, 0,-1,1)
    ,(0, 127,-12,27)
    ,(44175, 0,-65536,65535)
) | % {
    $e,$a = $_
    $r = &$f @a
    "$($e-eq$r): $r"
}
```
Output:
```
True: 19
True: 19
True: 24
True: 0
True: 2
True: 1
True: 0
True: 44175
```
[Answer]
# [Japt](https://github.com/ETHproductions/japt), ~~14~~ 8 bytes
Takes the integer to be found as the last input value.
```
õV èÈsøW
```
[Try it online](https://ethproductions.github.io/japt/?v=1.4.5&code=9VYg6Mhz+Fc=&input=LTIwMCwyMDAsMTI=)
---
## Explanation
```
             :Implicit input of integers U=start, V=end & W=number
õV           :Range [U,V]
    È        :Map
     s       :  Convert to string
      øW     :  Contains W?
   è         :Count truthy values
```
[Answer]
# [Vyxal](https://github.com/Lyxal/Vyxal) `s`, 7 bytes
```
÷ṡƛS?hc
```
[Try it Online!](https://lyxal.pythonanywhere.com?flags=s&code=%C3%B7%E1%B9%A1%C6%9BS%3Fhc&inputs=%5B3%2C1%2C100%5D&header=&footer=)
[Answer]
# Java, ~~92~~ ~~89~~ 71 bytes
Now with lambdas!
```
(t,l,u)->{int z=0;for(;l<=u;)if((l+++"").contains(t+""))z++;return z;};
```
Old 89 byte function solution:
```
int d(int t,int l,int u){int a=0,i=l;for(;i<=u;)if((i+++"").contains(t+""))a++;return a;}
```
Hooray for the super increment function!
[Answer]
# Groovy, 48 bytes
```
{a,b,c->(a..b).collect{"$it".count("$c")}.sum()}
```
[Answer]
## Racket 91 bytes
```
(for/sum((i(range s(+ 1 e))))(if(string-contains?(number->string i)(number->string d))1 0))
```
Ungolfed: 
```
(define(f d s e)
  (for/sum ((i (range s (+ 1 e))))
    (if(string-contains?
        (number->string i)
        (number->string d))
       1 0 )))
```
Testing: 
```
(f 3 1 100)
(f 3 3 93)
(f 12 -200 200)
(f 123 1 3)
(f 3 33 34)
(f 0 -1 1)
```
Output: 
```
19
19
24
0
2
1
```
[Answer]
# Axiom bytes 90
```
f(y,a,b)==(c:=0;for x in a..b repeat(if position(y::String,x::String,1)~=0 then c:=c+1);c)
```
results
```
(3) -> f(3,1,100)=19,f(3,3,93)=19,f(12,-200,200)=24,f(123,1,3)=0,f(3,33,34)=2
   (3)  [19= 19,19= 19,24= 24,0= 0,2= 2]
                                  Type: Tuple Equation NonNegativeInteger
(4) -> f(0,-1,1)=1, f(127,12,27)=0
   (4)  [1= 1,0= 0]
                                  Type: Tuple Equation NonNegativeInteger
```
[Answer]
## Mathematica, 70 bytes
```
(w=ToString;t=0;Table[If[StringContainsQ[w@i,w@#1],t++],{i,#2,#3}];t)&
```
**input**
> 
> [12,-200,200]
> 
> 
> 
**output**
> 
> 24
> 
> 
> 
[Answer]
## Clojure, 65 bytes
```
#(count(for[i(range %2(inc %3)):when(some(set(str %))(str i))]i))
```
[Answer]
## PHP, 56 Bytes
run as pipe
[**Try it online**](https://tio.run/##K8go@G9jX5BRoMClkliUXqZgqxBtrGOoY2hgEGvNZW8HlLQtLk0qLimKT84vzSvRyMrPzNMoSsxLT9XQUEm0BWvSjDaM1VFJjDaK1dQE0Qaxmtb//wMA)
**Input**
```
$argv = [number_to_find, range_start, range_end];
```
**Code**
```
<?=substr_count(join(range(($a=$argv)[1],$a[2])),$a[0]);
```
**Explanation**
```
#substrcount, counts the aparitions of a subtring in a string
substr_count( 
           join( range(($a=$argv)[1],$a[2])), # String with the range
           $a[0]);                            # The number you are looking for
```
[Answer]
# [Perl 6](https://github.com/nxadm/rakudo-pkg), 32 bytes
```
{+grep *.contains($^a),$^b..$^c}
```
[Try it online!](https://tio.run/##K0gtyjH7n1upoJamYKvwv1o7vSi1QEFLLzk/ryQxM69YQyUuUVNHJS5JT08lLrn2f3FipUKahrGOgiEQGRho/gcA "Perl 6 – Try It Online")
]