[Question]
  [
## Challenge
Given an integer \$Q\$ in the range \$-2^{100} ≤ Q ≤ 2^{100}\$, output the number of digits in that number (in base 10).
## Rules
Yes, you may take the number as a string and find its length.
All mathematical functions are allowed.
You may take input in any base, but the output must be the length of the number in base 10.
Do not count the minus sign for negative numbers. The number will never have a decimal point.
Zero can either have one or zero digits.
Assume the input will always be a valid integer.
## Examples
```
Input > Output
-45 > 2
12548026 > 8
33107638153846291829 > 20
-20000 > 5
0 > 1 or 0
```
## Winning
Shortest code in bytes wins.
  
[Answer]
# [Taxi](https://bigzaphod.github.io/Taxi/), 1118 bytes
```
1 is waiting at Starchild Numerology.Go to Post Office:w 1 l 1 r 1 l.Pickup a passenger going to Chop Suey.Go to Chop Suey:n 1 r 1 l 4 r 1 l.Pickup a passenger going to Crime Lab.'-' is waiting at Writer's Depot.Go to Writer's Depot:n 1 l 3 l.Pickup a passenger going to Crime Lab.Go to Crime Lab:n 1 r 2 r 2 l.Switch to plan "n" if no one is waiting.-1 is waiting at Starchild Numerology.[n]0 is waiting at Starchild Numerology.Go to Starchild Numerology:s 1 r 1 l 1 l 2 l.Pickup a passenger going to Cyclone.Pickup a passenger going to Addition Alley.Go to Cyclone:e 1 l 2 r.[r]Pickup a passenger going to Cyclone.Pickup a passenger going to Addition Alley.Go to Zoom Zoom:n.Go to Addition Alley:w 1 l 1 r.Pickup a passenger going to Addition Alley.Go to Chop Suey:n 1 r 2 r.Switch to plan "f" if no one is waiting.Pickup a passenger going to Sunny Skies Park.Go to Sunny Skies Park:n 1 l 3 l 1 l.Go to Cyclone:n 1 l.Switch to plan "r".[f]Go to Addition Alley:n 1 l 2 l.Pickup a passenger going to The Babelfishery.Go to The Babelfishery:n 1 r 1 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#tVTBasMwDP2VRy891azdTrl1G@wytkIGg5Ue3ERJTF052A6lX98lWZK2WdeFwQ5KsCzrPenJPkyhHHZSecUppEfopY0ypWO8FFuyRpt0L54MvMHCOI/XJFERBTtMoUuz1V8sVLQpckjk0jnilCxSUyUsTz1kJkdYUJulWwfcnsfdkDxWbQnPci3Gk3GP9LtVnuzY4ZFy4xugc2eNpnE7GKVh264btrPatAh3ykdZFZFryRjxCCoBGximE3JiMqi/S17dDNfh0lbgumZWNvutzH2kS6ZXY@ZxXLIxjLnWR/W@DgbUwFixtKt/QfowZlt/Am4852HHEfxDFb0ZrOroK5r8oOg1sLBg3iPcKHJYSLtpBeu5j7NYT/15Z@u9b2zsSCyT1cU@8CDF3zLCvVyTTpTLyLad6Lu7S3m9qydPwYXHgTtlDodP)
Ungolfed:
```
1 is waiting at Starchild Numerology.
Go to Post Office: west 1st left 1st right 1st left.
Pickup a passenger going to Chop Suey.
Go to Chop Suey: north 1st right 1st left 4th right 1st left.
Pickup a passenger going to Crime Lab.
'-' is waiting at Writer's Depot.
Go to Writer's Depot: north 1st left 3rd left.
Pickup a passenger going to Crime Lab.
Go to Crime Lab: north 1st right 2nd right 2nd left.
Switch to plan "n" if no one is waiting.
-1 is waiting at Starchild Numerology.
[n]
0 is waiting at Starchild Numerology.
Go to Starchild Numerology: south 1st right 1st left 1st left 2nd left.
Pickup a passenger going to Cyclone.
Pickup a passenger going to Addition Alley.
Go to Cyclone: east 1st left 2nd right.
[r]
Pickup a passenger going to Cyclone.
Pickup a passenger going to Addition Alley.
Go to Zoom Zoom: north.
Go to Addition Alley: west 1st left 1st right.
Pickup a passenger going to Addition Alley.
Go to Chop Suey: north 1st right 2nd right.
Switch to plan "f" if no one is waiting.
Pickup a passenger going to Sunny Skies Park.
Go to Sunny Skies Park: north 1st left 3rd left 1st left.
Go to Cyclone: north 1st left.
Switch to plan "r".
[f]
Go to Addition Alley: north 1st left 2nd left.
Pickup a passenger going to The Babelfishery.
Go to The Babelfishery: north 1st right 1st right.
Pickup a passenger going to Post Office.
Go to Post Office: north 1st left 1st right.
```
Explanation:
```
Pickup the input and split it into individual characters
Pickup the value 1.
If the first character a hyphen, add -1. Otherwise, add 0.
Keep picking up characters and adding 1 until you're out.
Convert the running total to a string and print to stdout.
```
[Answer]
## Mathematica, 13 bytes
```
IntegerLength
```
There's a built-in... returns `0` for `0`.
[Answer]
# dc, 3
```
?Zp
```
Note that normally `dc` requires negative numbers to be given with `_` instead of the more usual `-`. However, in this case, either may be used. If `-` is given, then `dc` treats this as a subtraction on an empty stack, throws `dc: stack empty`, and then continues with the rest of the number; Thus the result is no different.
[Try it online](https://tio.run/nexus/bash#RYxNCoMwFAb3nuJDWlwFkpefRoT2Ht2V5IluEjFZ9u6pCNJZzsDMeUflUsOnMNYEYSwUWeMlOWit5MNpr6z2xtGoPI0QJA8gJ8Tc4WDb11Rn9PcC8USP2/U7K4cl/xW@iAGCMbTXe2tDF3Pi9gM).
```
?    # input
 Z   # measure length
  p  # print
```
[Answer]
# [Brachylog](https://github.com/JCumin/Brachylog), 1 byte
```
l
```
[Try it online!](https://tio.run/nexus/brachylog2#@5/z/3@8oZGxien/KAA "Brachylog – TIO Nexus")
Another builtin solution, but this one has the shortest name (unless someone finds a language which does this task in zero bytes). This should work in both Brachylog 1 and Brachylog 2.
This is a function submission (the TIO link contains a command-line argument that causes the interpreter to run an individual function rather than a whole program), partly because otherwise we'd have to spend bytes on output, partly because Brachylog's syntax for negative numbers is somewhat unusual and making this program a function resolves any potential arguments about input syntax.
It's often bothered me that most of Brachylog's builtins treat negative numbers like positive ones, but that fact ended up coming in handy here. I guess there are tradeoffs involved with every golfing language.
[Answer]
## [Retina](https://github.com/m-ender/retina), 2 bytes
```
\d
```
[Try it online!](https://tio.run/nexus/retina#U9VwT/gfk/L/v66JKZehkamJhYGRGZexsaGBuZmxhaGpsYWJmZGloYWRJZeukQEQAAA "Retina – TIO Nexus")
Retina doesn't really know what numbers are, so the input is treated as a string and we simply count the digit characters.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 2 bytes
```
Äg
```
[Try it online!](https://tio.run/nexus/05ab1e#@3@4Jf3/f10TUwA "05AB1E – TIO Nexus") or [Try All Tests!](https://tio.run/nexus/05ab1e#qymr/H@4Jf1/pdLh/VYKSvY6/3VNTLkMjUxNLAyMzLiMjQ0NzM2MLQxNjS1MzIwsDS2MLLl0jQyAgMsAAA)
```
Ä  # Absolute value
 g # Length
```
[Answer]
## [Alice](https://github.com/m-ender/alice), 16 bytes
```
//; 'q<)e
o!@i -
```
[Try it online!](https://tio.run/nexus/alice#@6@vb62gXmijmcqVr@iQqaD7/7@uiSkA "Alice – TIO Nexus")
### Explanation
Finding a half-decent layout for this was quite tricky. I'm still not super happy with it because of the spaces, the `<` and the `;`, but this is the best I could do for now.
String length is one of those very common built-ins that doesn't exist in Alice, because its input is a string and its output is an integer (and all Alice commands are strictly integers to integer or strings to strings). We can measure a string's length by writing it to the tape in Ordinal mode and then finding its end in Cardinal mode.
```
/      Reflect to SE. Switch to Ordinal. While in Ordinal mode, the IP will bounce
       diagonally up and down through the code.
!      Store an implicit empty string on the tape, does nothing.
;      Discard an implicit empty string, does nothing.
i      Read all input as a string.
'-     Push "-".
<      Set the horizontal component of the IP's direction to west, so we're bouncing
       back now.
-      Remove substring. This deletes the minus sign if it exists.
'i     Push "i".
;      Discard it again.
!      Store the input, minus a potential minus sign, on the tape.
/      Reflect to W. Switch to Cardinal. The IP immediately wraps to the
       last column.
e)     Search the tape to the right for a -1, which will be found at the end
       of the string we stored there.
<      Does nothing.
q      Push the tape head's position, which is equal to the string length.
'<sp>  Push " ".
;      Discard it again.
/      Reflect to NW. Switch to Ordinal. The IP immediately bounces off
       the top boundary to move SW instead.
o      Implicitly convert the string length to a string and print it.
       IP bounces off the bottom left corner, moves back NE.
/      Reflect to S. Switch to Cardinal.
!      Store an implicit 0 on the tape, irrelevant.
       The IP wraps back to the first line.
/      Reflect to NE. Switch to Ordinal. The IP immediately bounces off
       the top boundary to move SE instead.
@      Terminate the program.
```
I also tried taking care of the minus sign in Cardinal mode with `H` (absolute value), but the additional mode switch always ended up being more expensive in my attempts.
[Answer]
# [brainfuck](https://github.com/TryItOnline/tio-transpilers), 37 bytes
```
-[+>+[+<]>+]>->,[-<->]<[>+>],[<+>,]<.
```
Output is by byte value.
[Try it online!](https://tio.run/nexus/brainfuck#bY@9DsIwDIT3PIV3N5lgs@4p2CIPBYJaqT@oLeLxi1NKoRKeYt19d87sI4Mji4IVHkX04qESwdAiCqNQCfOpqke69f2UBrJXlYZEU0/3oe4mmqpE3aM9Z62ja7rUbdlQOdIzNY1zItErbxMAB3z3LFuZz41QRLYLrHvZZBkFLAE7yJhfwu0RfQNxJXLiOmYIYmbODvvmEiT68W0VzjLCYpG/GSblw3OtzP5wfAE "brainfuck – TIO Nexus")
### Explanation
```
-[+>+[+<]>+]>->  Constant for 45 (from esolangs wiki)
,                Read a byte of input
[-<->]           Subtract that byte from 45
<[>+>]           If the result is nonzero then increment a cell and move to the right
                 (0 means it was a minus; so not counted)
,[<+>,]          Read a byte and increment the cell to its left until EOF is reached
<.               Print the cell that was being incremented
```
[Answer]
# PHP, 23 Bytes
```
<?=-~log10(abs($argn));
```
[Try it online!](https://tio.run/nexus/php#s7EvyCjgUkksSs@zVTJQsuayt/tvY2@rW5eTn25ooJGYVKwBltTUtP7/HwA "PHP – TIO Nexus")
log of base 10 of the absolute value plus one cast to int
for zero as input log10 gives back `INF` which is interpreted as false
The better way is to replace `$argn` with `$argn?:1` +3 Bytes
# PHP, 27 Bytes
```
<?=strlen($argn)-($argn<0);
```
string length minus boolean is lower then zero
+2 Bytes for string comparision `$argn<"0"`
[Try it online!](https://tio.run/nexus/php#s7EvyCjgUkksSs@zVdI1NTE2MjQwNDI0MjYxMTVTsuayt/tvY29bXFKUk5qnAVamqQuhbQw0rf//BwA "PHP – TIO Nexus")
## PHP, 32 Bytes
```
<?=preg_match_all("#\d#",$argn);
```
[Try it online!](https://tio.run/nexus/php#s7EvyCjgUkksSs@zVTJQsuayt/tvY29bUJSaHp@bWJKcEZ@Yk6OhpByToqykA1amaf3/PwA "PHP – TIO Nexus")
Regex count all digits
## 35 Bytes
```
<?=strlen($argn)-strspn($argn,"-");
```
[Try it online!](https://tio.run/nexus/php#s7EvyCjgUkksSs@zVTJQsuayt/tvY29bXFKUk5qnARbX1AXyigugPB0lXSVN6///AQ "PHP – TIO Nexus")
string length minus count `-` 
[strspn](http://php.net/manual/en/function.strspn.php)
[Answer]
# Fortran 95 (gfortran), ~~121~~ ~~96~~ 95 bytes
```
program c
character b
call get_command_argument(1,b,length=i)
print*,i-index(b,'-')
end program
```
Explanation:  
Subtracts the index of the '-' sign from the length of the argument.  
Arrays start at 1 in Fortran, and index() returns 0 if symbol not found. 
*Edit: Switched to implicit integer "i", also consolidated argument getter.*
*Edit: -1 byte thanks to @Tsathoggua*
[Answer]
# [GNU AWK](https://www.gnu.org/software/gawk/manual/gawk.html), 18 17 15 bytes
```
$1=gsub(/\w/,1)
```
Substitutes every number character (except for the minus sign) alphanumeric character of the input for another character (here, the number 1), and assigns the number of substitutions to the output.
Thanks for cnamejj and manatwork for helping me saving some bytes!
[Try it online!](https://tio.run/##SyzP/v9fxdA2vbg0SUM/plxfx1Dz/39dE1MuQyNTEwsDIzMuY2NDA3MzYwtDU2MLEzMjS0MLI0suXSMDIOAyAAA "AWK – Try It Online")
# [AWK](https://www.gnu.org/software/gawk/manual/gawk.html), 17 bytes
```
$1=gsub(/[^-]/,1)
```
This is a previous answer, that should work on any Awk version, not only GNU's.
[Try it online!](https://tio.run/##SyzP/v9fxdA2vbg0SUM/Ok43Vl/HUPP/f10TUy5DI1MTCwMjMy5jY0MDczNjC0NTYwsTMyNLQwsjSy5dIwMg4DIAAA "AWK – Try It Online")
[Answer]
# PowerShell, 24 Bytes
```
"$args"-replace'-'|% Le*
```
casts the "absolute" value of the input args to a string and gets the 'length' property of it.
1 byte shorter than `"".Length`
until someone finds a better way to get the abs of a number in PS this is probably as short as it will get.
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 2 bytes
```
þg
```
[Try it online!](https://tio.run/nexus/05ab1e#@394X/r//7qGRsZ6JqZmAA "05AB1E – TIO Nexus")
```
   # Implicit input [a]...
þ  # Only the digits in [a]...
 g # length of [a]...
   # Implicit output.
```
[Answer]
# Ruby, ~~15~~ 11+1 = ~~16~~ 12 bytes
Uses the `-n` flag.
```
p~/$/-~/\d/
```
[Try it online!](https://tio.run/nexus/ruby#U1YsKk2qVNDN@19Qp6@ir1unH5Oi//@/rokpl6GRqYmFgZEZl7GxoYG5mbGFoamxhYmZkaWhhZEll66RARBwGQAA "Ruby – TIO Nexus")
### Explanation
```
                  # -n flag gets one line of input implicitly
p                 # Print
 ~/$/             # Position of end of line (aka string length) in input
     -            # minus
      ~/\d/       # Position of first digit (1 if negative number, 0 otherwise)
```
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 2 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
DL
```
**[Try it online!](https://tio.run/nexus/jelly#@@/i8///f10TUwA "Jelly – TIO Nexus")**
This does literally what was asked:
```
DL - Main link number n         e.g. -45
D  - convert to a decimal list       [-4,-5]
 L - get the length                  2
```
[Answer]
# [Python 2](https://docs.python.org/2/), ~~31~~ 22 bytes
*-9 bytes thanks to Rod.*
```
lambda i:len(`abs(i)`)
```
[Try it online!](https://tio.run/nexus/python2#S7ON@Z@TmJuUkqiQaZWTmqeRkJhUrJGpmaD5v6AoM69EIU1D18RUkwvGMTQyNbEwMDJDiBgbGxqYmxlbGJoaW5iYGVkaWhhZImR1jQyAAME30PwPAA "Python 2 – TIO Nexus\"GloYWSLL6xoZAAGyCJDzHwA \"Python 2 – TIO Nexus")
[Answer]
# [CJam](https://sourceforge.net/p/cjam), 5 bytes
```
q'--,
```
String based.
[Try it online!](https://tio.run/nexus/cjam#@1@orqur8/@/AQA "CJam – TIO Nexus")
9 bytes for a purely math-based solution:
```
riz)AmLm]
```
Or another 5 with base conversion:
```
riAb,
```
[Answer]
# [Brain-Flak](https://github.com/DJMcMayhem/Brain-Flak), 63 bytes
```
([({})]((((()()()()())){}{})){}{})((){[()](<{}>)}{})([{}][]<>)
```
[Try it online!](https://tio.run/nexus/brain-flak#@68RrVFdqxmrAQKaMKipWV0LFIWQQPHqaA2gEpvqWjtNsEh0dW1sdKyNneb//7qGBv91EwE "Brain-Flak – TIO Nexus")
This is 62 bytes of code and +1 byte for the `-a` flag.
I tried two other approaches, but unfortunately both of them were longer:
```
([]<({}[((((()()()()())){}{})){}{}]<>)((){[()](<{}>)}{})>)({}[{}])
([]<>)<>({}<>)((((([][]())){}{})){}{}[{}])((){[()](<{}>)}{})([{}]{})
```
This *should* be a very short answer. In fact, if we didn't have to support negative numbers, we could just do:
```
([]<>)
```
But we have to compare the first input with 45 (ASCII `-`) first, which is most of the byte count of this answer.
An arithmetic solution might be shorter.
[Answer]
# [Japt](https://github.com/ETHproductions/japt), 5 bytes
```
a s l
```
[Try it online!](https://tio.run/nexus/japt#@5@oUKyQ8/@/rpGpOQA "Japt – TIO Nexus")
# Explanation
```
 a s l
Ua s l
Ua     # take the absolute value of the input
   s   # and turn it into a string
     l # and return its length
```
[Answer]
# Ruby, 20 bytes
```
->a{a.abs.to_s.size}
```
[Answer]
# [RProgN 2](https://github.com/TehFlaminTaco/RProgN-2), 2 bytes
```
âL
```
[Try it online!](https://tio.run/nexus/rprogn-2#@394kc////91DS1MTMzMTUwMzI3NDSxNTQ3NDE0B "RProgN 2 – TIO Nexus")
Simply gets the absolute value of the input, and counts the digits.
[Answer]
# Pyth, 4 bytes
```
l`.a
```
[Try it online!](http://pyth.herokuapp.com/?code=l%60.a&debug=0)
[All test cases](http://pyth.herokuapp.com/?code=l%60.a&test_suite=1&test_suite_input=-45%0A12548026%0A33107638153846291829%0A20000%0A0&debug=0)
[Answer]
# [Perl 5](https://www.perl.org/), 9 + 1 = 10 bytes
```
$_=y/-//c
```
[Try it online!](https://tio.run/nexus/perl5#@68Sb1upr6uvn/z/v66JKZehkamJhYGRGZexsaGBuZmxhaGpsYWJmZGloYWRJZeukQEQcBn8yy8oyczPK/6vm1MAAA "Perl 5 – TIO Nexus")
Run with `-p` (1 byte penalty).
## Explanation
```
$_=y/-//c
            {implicit from -p: for each line of input}
   y/ //    In {the input}, replace
        c     everything except
     -        '-'
$_=         Store number of replacements back in $_
            {implicit from -p: output $_}
```
We treat the input as a string in order to handle numbers outside the 64-bit range. One interesting trick here is that we don't have to specify what we're replacing the nonhyphens *with*; we can still count the number of replacements that occur.
The TIO link uses `-l` in order to let us run the program on multiple data without the newlines between them interfering. If the program only has to run once, we can do without it, so long as there's no final newline on the input.
[Answer]
# JavaScript (ES6), ~~27~~ ~~26~~ ~~25~~ 24 bytes
Takes input as a string.
```
s=>s.match(/\d/g).length
```
* Saved two bytes thanks to Arnauld.
[Answer]
## R, 18 bytes
```
nchar(abs(scan()))
```
[Answer]
## JavaScript (ES6), 23 bytes
```
s=>`${s>0?s:-s}`.length
```
Different approach to [Shaggy's answer](https://codegolf.stackexchange.com/a/120911/9365).
[Answer]
# Java, ~~30~~ 24 bytes
```
i->(""+i.abs()).length()
```
Assumes `i` is a `BigInteger`. Also, the type is contextualized, so no imports are required, as shown in the test code.
## Test
```
// No imports
class Pcg120897 {
  public static void main(String[] args) {
    java.util.function.ToIntFunction<java.math.BigInteger> f =
        // No full class declaration past here
        i->(""+i.abs()).length()
        // No full class declaration before here
      ;
    System.out.println(f.applyAsInt(new java.math.BigInteger("-1267650600228229401496703205376"))); // -(2^100)
    System.out.println(f.applyAsInt(new java.math.BigInteger("1267650600228229401496703205376"))); // (2^100)
  }
}
```
## Saves
* 30 -> 24 bytes : thanks to @cliffroot
[Answer]
# [V (vim)](https://github.com/DJMcMayhem/V), 20 bytes
```
:s/-
C<C-r>=strlen(<C-r>")
<esc>
```
[Try it online!](https://tio.run/##K/v/36pYX5fL2cZZt8jOtrikKCc1TwPMUdLkskktTrb7/1/X3MLyv24ZAA "V (vim) – Try It Online")
Remove minuses(if any), cut the line, and get its length.
Not sure if I need the `<esc>` at the end.
[Answer]
# [Risky](https://github.com/Radvylf/risky), 2 bytes
```
!?}*
```
[Try it online!](https://radvylf.github.io/risky?p=WyIhP30qIiwiWy0zMzEwNzYzODE1Mzg0NjI5MTgyOW5dIiwwXQ)
```
! length
?     input
}   base convert
*     10
```
[Answer]
# [FALSE](https://github.com/somebody1234/FALSE), 14 bytes
```
^45=[1+^~][]#.
```
[Try it online!](https://tio.run/##S0vMKU79/z/OxNQ22lA7ri42OlZZ7/9/XRNTAA "FALSE – Try It Online")
Explanation:
If first character is '-' (ascii code 45), then push -1. Else push 0. Add 1 to number on stack until EOF character is reached.
]