[Question]
  [
# Definition
Given some string return an integer whose digits are the number ocurrences of a-z (case insensitive, in alphabetical order) in that string. Any character with 0 instances is skipped. Characters with 10 or more instances will define 2 or more digits of the returned integer. For example, aaaaaaaaaaaaaaaaaaaaaaaaaaad (27 a's followed by d) will return 271.
# Input
A single string with one or more letters
# Output
An integer or a string representing an integer
# Test Cases
| Input | Output |
| --- | --- |
| acfzzA | 2112 |
| Hello World! | 1113211 |
| ---!&\*#$ | invalid input, any result is acceptable |
| ---!&\*#$a | 1 |
| aaaaaaaaaaaaaaaaaaaaaaaaaaad | 271 |
| aaaaaaaaaad | 101 |
| cccbba | 123 |
| abbccc | 123 |
This is code-golf, so the shortest answer in bytes wins! Standard loopholes and rules apply. Tie goes to first poster.
  
[Answer]
# [Python 2](https://docs.python.org/2/), 64 bytes
```
f=lambda s,c=65:91/c*s and'%.d'%s.upper().count(chr(c))+f(s,c+1)
```
[Try it online!](https://tio.run/##dUzdCoIwGL3fU3zRj5t/8RkVCQbd9QZdxpqKwtrGnEi@vE277sC5OL/m4xqtsmmqC8nfr5JDF4vidMwvuBdhB1yVwTb17NLemMpSlgrdK0dFY6lgLKqpH0TIpqFpZQWYE2iViUH3zkABlg9Pr3vnh52RraMBJFcIGAFjW@Wgpj5mv/7ERT2Ot7mQIWbkXkmp4aGtLFeziYgHH5AkSVa7cL3hi0n4f5TL1xm/ "Python 2 ‚Äì Try It Online")
[Answer]
# C, ~~137~~, ~~124~~, [90](https://tio.run/##DcrdCsIgGAbg8@6iVeKXfbB@CES6EvFA3qYT1god7CDq0rOdPjzgCNRarNbOPHwaJeg992noJPjYUrESt9hN6H2WROJ7PjmlTHjmxa8XA9atWZZScEK8chqnIJvdvTkUC0fmUyszr8V@s/WrH8LgY6k8/wE), ~~88~~ bytes
Thank you @AnttiP and @tsh for suggestions!
```
s[99];main(c){while(c-10)s[(c=getchar())&~32]++;for(c=64;c-90;)s[++c]&&printf("%d",s[c]);}
```
less golfed version:
```
s[99];
int main(c){
       
    while(c-10)
        s[(c=getchar())&~32]++;
    for(c=64;c-90;)
        s[++c]&&printf("%d",s[c]);
}
```
[Try it online!](https://tio.run/##DcrdCsIgGAbg8@6iVeKXfbB@CES6EvFA3qYT1god7CDq0rOdPjzgCNRarNbOPHwaJeg992noJPjYUrESt9hN6H2WROJ7PjmlTHjmxa8XA9atWZZScEK8chqnIJvdvTkUC0fmUyszr8V@s/WrH8LgY6k8/wE)
[Answer]
# [Python 3.8](https://docs.python.org/3.8/), 76 bytes:
```
lambda x:''.join(str(i)for a in range(97,123)if(i:=x.lower().count(chr(a))))
```
[Try it online!](https://tio.run/##dYqxDoIwFEV3v6JEY1@NkCiDSsLg5h@4uDxbKjW1jzxrRH6@MpkweLZ7zu0@saVQ7jtOtr4kj4@rQdFXUhZ3cgGekcEpSyxQuCAYw62Bw2692ZbKWXBV3Ree3g2DKjS9QgTdMqAaSR27cVuQqO0wHKVSs586Nd6TOBN7k01CnufZcjVf4MTif8x4TF8)
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 10 bytes
```
‚≠ÜŒ±‚™´‚Ü®‚Ññ‚Ü•Œ∏Œπœáœâ
```
[Try it online!](https://tio.run/##S85ILErOT8z5/z@gKDOvRCO4BEil@yYWaCTqKHjlZ@ZpOCUWp2o455cCJUMLClKLkkH8Qk0dhUwgNjQAEuWamprW//97pObk5OsohOcX5aQocv3XLcsBAA "Charcoal ‚Äì Try It Online") Link is to verbose version of code. Explanation:
```
 Œ±          Predefined variable uppercase alphabet
‚≠Ü           Map over letters and join
    ‚Ññ       Count of
       Œπ    Current letter in
     ‚Ü•      Uppercased
      Œ∏     Input string
   ‚Ü®    œá   Convert to base 10
  ‚™´      œâ  Join digits together
```
Charcoal's arbitrary base conversion returns an empty list for an input of zero, which is the easiest way to map zero to an empty string.
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal), 44 [bitsv2](https://github.com/Vyxal/Vyncode/blob/main/README.md), 5.5 bytes
```
«ç‚á©sƒ†@·πÖ
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyI9IiwiIiwix43ih6lzxKBA4bmFIiwiIiwiYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhZCJd)
## Explained
```
«ç‚á©sƒävt·πÖ
«ç       # keep only letters of the alphabet
 ‚á©      # and convert to lowercase
  sƒä    # sort that and get the counts of each letter - this returns [[letter, count of letter] for each letter
    vt·πÖ # join the counts of letters on ""
```
[Answer]
# [PHP](https://php.net/), 66 bytes
```
<?=join(count_chars(preg_replace('~\W~','',strtolower($argn)),1));
```
[Try it online!](https://tio.run/##BcFBCoAgEADAt0SRGnroXNGtL3QJQkSyCHdZjW4@vW0GAzKP83TBGaWDJ@bdBUtJIvljJ4@3dV6Ksq1FaCF0ypThhteTbCwdUSndKzUwG2Oqtqsb@wHmE2Jis/w "PHP ‚Äì Try It Online")
A rarely useful builtin function, but it turns out satisfying when it does
[Answer]
# [R](https://www.r-project.org/), ~~78~~ 69 bytes
Or **[R](https://www.r-project.org/)>=4.1, 62 bytes** by replacing the word `function` with `\`.
*Edit: -9 bytes inspired by [@Giuseppe's answer](https://codegolf.stackexchange.com/a/238567/55372).*
```
function(s)cat(table(utf8ToInt(gsub("[^a-z]","",tolower(s)))),sep="")
```
[Try it online!](https://tio.run/##dY49D4IwFEVn@RXlYUwxZagOujC46W7i4EfyKK1p0rSEthr58whsJHrXe3LubXtV9ipaEbSz1OcCAw1YGUljUPuzO9lAnz5WFK4PLLo7MAAWnHFv2Q74EOZlUwLkvaKAQnXdAfJsseF8k4wyuFnIk6E7SmMcubjW1OlIcM63AzWHiqJIV@tsOQLavtDommjbxMAI2g9ppY8mEO0JCiGb6ehvAU4T8w7/p54@73j/BQ "R ‚Äì Try It Online")
Prints the resulting number like in [@Giuseppe's answer](https://codegolf.stackexchange.com/a/238567/55372).
[Answer]
# [Wolfram Language (Mathematica)](https://www.wolfram.com/wolframscript/), ~~54~~ 52 bytes
```
""&@@@Array[ToString/@Counts@LetterNumber@#,26]<>""&
```
[Try it online!](https://tio.run/##y00syUjNTSzJTE78n2b7X0lJzcHBwbGoKLEyOiQ/uKQoMy9d38E5vzSvpNjBJ7WkJLXIrzQ3KbXIQVnHyCzWxg6o4X8AUFVJtLKuXZqDc0ZiUWIyUFWxg3KsWl1wcmJeXTWXUmJyWlWVo5IOl5JHak5OvkJ4flFOiiKIr6urq6impaySCOIk4gYpSly1/wE "Wolfram Language (Mathematica) ‚Äì Try It Online")
```
                             LetterNumber@#             a->1,...,z->26, others->0
                      Counts@                           letter counts
      Array[                               ,26]           for a,...,z
""&@@@                                                    (don't include missing letters)
            ToString/@                         <>""     concatenate
```
[Answer]
# [Perl 5](https://www.perl.org/) + `-p`, 23 bytes
```
s/\pl/$\.=s!$&!!gi/ge}{
```
[Try it online!](https://tio.run/##K0gtyjH9/79YP6YgR18lRs@2WFFFTVExPVM/PbW2@v9/j9ScnHyF8PyinBTFf/kFJZn5ecX/dQsA "Perl 5 ‚Äì Try It Online")
---
# [Perl 5](https://www.perl.org/) + `-n`, 23 bytes
```
s/\pl/print s!$&!!gi/ge
```
[Try it online!](https://tio.run/##K0gtyjH9/79YP6YgR7@gKDOvRKFYUUVNUTE9Uz899f9/j9ScnHyF8PyinBTFf/kFJZn5ecX/dfMA "Perl 5 ‚Äì Try It Online")
[Answer]
# bash, ~~64~~ 44 bytes
#### Original Solution (64 Bytes)
Fairly simple `tr`-based solution - `bash` probably isn't a good way to make a competitive answer, but I had fun doing it!
```
tr [A-Z] [a-z]|tr -dc [a-z]|grep -o .|sort|uniq -c|tr -dc [0-9]
```
Depending on how you want to count characters, it could be more than 64 when including the input to this. A very simple case would be:
```
echo my-input-string|tr [A-Z] [a-z]|tr -dc [a-z]|grep -o .|sort|uniq -c|tr -dc [0-9]
```
which really only adds six characters at best and eight if you have to single-quote the input string.
Explanation:
```
tr [A-Z]  [a-z]   # Convert all capitals to lowercase in the input stream
tr -dc [a-z]      # Delete everything that isn't a lowercase letter
grep -o .         # Output every character on its own line
sort | uniq -c    # Get a two-column output of all unique characters and their frequencies
tr -dc [0-9]      # Delete everything that isn't a digit
```
#### 44 Byte Solution (by @Digital Trauma)
```
grep -io [a-z]|sort -i|uniq -ci|tr -dc [0-9]
```
Among other improvements, this bash solution utilizes some case-insensitive options for utilities such as `sort` and `uniq`.
Here's @Digital Trauma's [Try It Online](https://tio.run/##dcsxC8IwEAXg/X7FtRYH4cBVnBwEBwdxEakdkku0gdDTtCKE/PcYF3HxTd@D97Qa@/zqnbcYrDJrNAKWe8G6OW4P@3ONCS/5FuwdyQm2imKXRglTqek5uAcSuzQFJMPYLmnV5c8djAw2K77GuIGd9V7wJMGbCoiomi9mzRcK1P8Y@DUza132WhfBGw)
[Answer]
# [Factor](https://factorcode.org/) + `spelling`, 56 bytes
```
[ >lower ALPHABET counts values [ present ] map-concat ]
```
The `counts` word postdates Factor build 1525, the one TIO uses, so here's a screenshot of running the above code in build 2101's listener:
[![A screenshot of running the above code snippet](https://i.stack.imgur.com/UHaVb.png)](https://i.stack.imgur.com/UHaVb.png)
## Explanation
```
                        ! "acfzzA"
>lower                  ! "acfzza"
ALPHABET                ! "acfzza" "abcdefghijklmnopqrstuvwxyz"
counts                  ! { { 97 2 } { 99 1 } { 102 1 } { 122 2 } }
values                  ! { 2 1 1 2 }
[ present ] map-concat  ! "2112"
```
[Answer]
# [BQN](https://mlochbaum.github.io/BQN/), ~~30~~ 28 bytes[SBCS](https://github.com/mlochbaum/BQN/blob/master/commentary/sbcs.bqn)
```
{‚àæ‚Ä¢Fmt¬®√ó‚ä∏/+Àù(‚•äùï©-‚åú"aA")=‚åú‚Üï26}
```
[Run online!](https://mlochbaum.github.io/BQN/try.html#code=RiDihpAge+KIvuKAokZtdMKow5fiirgvK8udKOKlivCdlakt4oycImFBIik94oyc4oaVMjZ9Cgo+4ouI4p+cRsKoIOKfqCJhY2Z6ekEiCiJIZWxsbyBXb3JsZCEiCiItLS0hJiojJCIKIi0tLSEmKiMkYSIKImFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWQi4p+p)
`‚Üï26` Range from 0 to 25.  
`‚•äùï©-‚åú"aA"` Differences between each of the characters in the input and a or A.  
`=‚åú` Equality table between those two vectors.  
`+Àù` Sum the columns.  
`√ó‚ä∏/` Keep the values with sign 1 (or: remove the zeros)  
`‚àæ‚Ä¢Fmt¬®` Convert each value to a string and join.
A slightly different approach using *Bins Down* at 29 bytes:
```
{‚àæ‚Ä¢Fmt¬®√ó‚ä∏/¬ª1‚Üì/‚Åº27‚Üï‚ä∏‚çã‚•äùï©-‚åú"aA"}
```
[Run online!](https://mlochbaum.github.io/BQN/try.html#code=RiDihpAge+KIvuKAokZtdMKow5fiirgvwrsx4oaTL+KBvDI34oaV4oq44o2L4qWK8J2VqS3ijJwiYUEifQoKPuKLiOKfnEbCqCDin6giYWNmenpBIgoiSGVsbG8gV29ybGQhIgoiLS0tISYqIyQiCiItLS0hJiojJGEiCiJhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFkIuKfqQ==)
[Answer]
# [R](https://www.r-project.org/), ~~75~~ 72 bytes
```
function(s,x=tabulate((y=utf8ToInt(s))%%32*(y>64),26))cat(x[!!x],sep="")
```
[Try it online!](https://tio.run/##dY6xDoIwGIRneYpSxLQEhoJBF0zcdDdxMA6/pU2aNIXQ1gAvj8Bmord@3@Wum2Q1SW@4U40hNu0rBy@vwQlChso7ebw1V@OIpTSOizwhw6nc0zQvKeXgSP8Iw/6ZWtFWGNNJEgxcjuMZ02iTM5YHi4QDTIMZXYTWDbo3na7DRWCMFbP05WRZFu6SaLtwZd6gVY2Uab1LEZgBdcJ67ZCyCDgX7fxVi599WAe@EPxPvf49sOkD "R ‚Äì Try It Online")
Prints the result. For invalid input, prints nothing.
-3 bytes thanks to Dominic van Essen.
Test harness taken from [pajonk's answer](https://codegolf.stackexchange.com/a/238546/67312).
[Answer]
# JavaScript (ES6), 63 bytes
Expects an array of characters.
```
a=>a.map(c=>o[i=parseInt(c,36)]=-~o[i],o=[])|o.slice(10).join``
```
[Try it online!](https://tio.run/##dYuxCsIwFEV3v8JWkUSahyK4peCmX@AQAn2kaUmJeaUpDkX89ai7ueM55w74xGgmN84iUGtTJxPKGuGBIzOyJuXkiFO0tzAzU53OXEvx/lJdkVSavwiid8ay44HDQC40TTIUInkLnnrWMQUAJZpuWS6l5nz1x16t97S@0@TbItcIIYrdfrPFXID5tb9P@gA "JavaScript (Node.js) ‚Äì Try It Online")
### Commented
```
a =>                // a[] = input array
a.map(c =>          // for each character c in a[]:
  o[                //   update o[]:
    i =             //     let i be the result of
    parseInt(c, 36) //     c parsed in base-36
                    //     which gives 0 to 9 for [0-9],
                    //     10 to 35 for [a-z] and [A-Z]
                    //     and NaN for anything else
                    //     (o[NaN] is not an entry of the array but
                    //     an object property which will be ignored
  ] =               //     by join())
    -~o[i],         //     increment it / set it to 1 if it's undefined
  o = []            //   initialize o[] to an empty array
) |                 // end of map()
o.slice(10)         // ignore the first 10 entries
.join``             // join the remaining ones; undefined values are
                    // coerced to empty strings
```
[Answer]
# [PowerShell](https://github.com/PowerShell/PowerShell), ~~56~~ 50 bytes
```
%{-join($_|% T*y|% *g|sort|group|? N* -m \w|% C*)}
```
Input comes from the pipeline.
[Try it online!](https://tio.run/##dY5NDoIwEIX3nmLAYqGxRA@gxrhxYVyZuFBj@BMwSEkLIUI5OxaJRBfOYjLfe5l5k7Ey4CIKkqRFIudxGgpYAHa8W1Wt8RTwVlkMjownvtYxpVSbkDH6np0OnP/l//pv9DzPdftF11WAR4gHokhyFT98IlujpncWpya6SgMO5Kk6CaVgPJchZ0UmV7AnQB9wLpW1IVbTzmzb/Fywd0Ea5hGdW9KodYwG44SuFwsDpUvo1D66F/WmfQE)
Try it in a PS console:
```
$strings = 'acfzzA', 'Hello World!', '---!&*#$', '---!&*#$a', 'aaaaaaaaaaaaaaaaaaaaaaaaaaad', 'aaaaaaaaaad', 'cccbba', 'abbccc'
$result = $strings |
%{-join($_|% T*y|% *g|sort|group|? N* -m \w|% C*)}
1..($strings.Length-1)|%{"'$($strings[$_])' --> '$($result[$_])'"}
```
*-5 by rearranging the first version `%{-join($_|% T*y|% *g|?{$_-match'\w'}|sort|group|% C*t)}`; moving the "match" filter after the "group" allows the use of the "<Property> <Operator> <Value>" syntax of Where-Object instead of using a FilterScript.*  
*-1 by removing the unnecessary "t" from "% C\*t"*
## Explanation
**%{...}** "%" is an alias for the cmdlet "ForEach-Object", which accepts input from the pipeline and processes each incoming object inside the ScriptBlock {...}  
**-join(...)** Unary operator which will join the all the character counts returned inside the expression  
**% T\*y** takes the input string and calls its method "ToCharArray()", turning the string into an array of single characters.  
**% \*g** takes the array of characters and turns them back to single-character strings by invoking ToString() (the only method matching "\*g"), because Group-Object is case sensitive for characters, but not for strings.  
**sort** is an alias for Sort-Object, which will sort the characters.  
**group** is an alias for Group-Object, which will group the characters, and return objects with a Count property for each character; returns GroupInfo objects.  
**? N\* -m \w** "?" is an alias for "Where-Object", the rest expands to "-Property 'Name' -match '\w'" - this lets only objects pass where the Name property (which contains the grouped character) consists only of word (\w) characters. PS allows for partial named parameters, so -m will be identified as -match.  
**% C\*** gets the property "Count" (the only one starting with C) of the GroupInfo objects.  
All the counts will now be collected and joined to a single string; output is implicit.
## Ungolfed
```
ForEach-Object -Process {
    -join (                                             # Will join the counts of all characters produced inside the brackets into a single string
        $_ |                                            # Input string
            ForEach-Object -MemberName ToCharArray |    # input string to single chars
            ForEach-Object -MemberName ToString |       # input chars to single-char strings
            Sort-Object |
            Group-Object |                              # group same characters
            Where-Object -Property 'Name' -match '\w' | # let only word characters pass ("Name" contains the string/character used to group)
            ForEach-Object -MemberName Count            # get only the count of the grouped objects
    )
}
```
[Answer]
# [Husk](https://github.com/barbuz/Husk), ~~11~~ ~~9~~ 8 bytes
*Edit: -2 bytes but +1 (bug fix) for a net -1 byte, all thanks to Razetime*
```
·πÅosLk_f‚àö
```
[Try it online!](https://tio.run/##yygtzv7//@HOxvxin@z4tEcds/7//@@RmpOTr6MQnl@Uk6IIAA "Husk ‚Äì Try It Online")
Digits are in alphabetical order of each letter.
```
       f‚àö    # filter for only letters,
     k_      # and group letters by lowercase value;
 ·πÅo          # now map to each group & combine the results:
    L        #  get the length
   s         #  and convert to a string
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 7 bytes
```
lD√°√™S¬¢J
```
[Try it online!](https://tio.run/##yy9OTMpM/f8/x@XwwsOrgg8t8vr/3yM1JydfITy/KCdFEQA "05AB1E ‚Äì Try It Online")
-2 bytes and fix thanks to @KevinCruijssen and @ovs
[Answer]
# Python3, ~~72~~ ~~70~~ ~~67~~ 87 bytes
```
lambda x:''.join(map(str,map((x:=x.lower()).count,sorted(filter(str.isalpha,set(x))))))
```
[Try it online](https://tio.run/##dYqxDsIgFEV3v6JGIw/TsriYJh3c/AMXl2eBFPMKBDBifx6rg0kHz3KTc49/pcHZw9GHortrIRxvEqvcMibuzlgY0UNMof4s5LbLgtxTBeBc9O5hUx1dSEqCNpRmPafCRCQ/YB1Vgsy/FB@MTaCBYa@n6cQ4X/3UWRG56uICyfXiaJpmvdtvtriw@B85h@UN)
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 8 bytes
```
≈íuf√òA·π¢≈í…†
```
[Try it online!](https://tio.run/##y0rNyan8///opNK0wzMcH@5cdHTSyQX/D7drRv7/r56YnFZV5aiuo@4BVJWvEJ5flJOiCOTq6uoqqmkpqyQC2Ym4QYo6AA "Jelly ‚Äì Try It Online")
# [Jelly](https://github.com/DennisMitchell/jelly), 8 bytes
```
≈íuƒã‚±Æ√òA¬π∆á
```
[Try it online!](https://tio.run/##y0rNyan8///opNIj3Y82rjs8w/HQzmPt/w@3a0b@/6@emJxWVeWorqPuAVSWrxCeX5STogjk6urqKqppKaskAtmJuEGKOgA "Jelly ‚Äì Try It Online")
Both as full programs, taking advantage of Jelly's automatic smash-printing behavior.
[Answer]
# [JavaScript (Node.js)](https://nodejs.org), 64 bytes
```
s=>s.sort().join(o='').replace(/([a-z])\1*/gi,c=>o+=c.length)&&o
```
[Try it online!](https://tio.run/##dYtBDoIwEADvvkLQQIt2iQ8oiTd/4AE5bEpByKZLWuKhn6/xbuc6Myt@MBi/bLtyPNo06RR0FyCw34WElRcnWNe1BG83QmNFK3pUcZCvW9POy9Xoji/aAFk3729ZVZwMu8BkgXgWk@gBoEQzxXgvBykPf@zDEvHxyZ7GItcopYqqOZ0xF2Ce8fekLw "JavaScript (Node.js) ‚Äì Try It Online")
Based off Arnauld's answer. Takes input as a character array.
Sort, join, match runs of one character and append that to `o`, and yield that at the end.
[Answer]
# APL+WIN, ~~48~~ 44 bytes
Prompts for string
```
10‚ä•((+/(48+m)‚àò.=n)++/(m‚Üê17+‚ç≥26)‚àò.=n‚Üê‚éïav‚ç≥‚éï)~0
```
[Try it online! Thanks to Dyalog Classic](https://tio.run/##SyzI0U2pTMzJT9dNzkksLs5M/v@ob6qvz6O2CcZcQJanP5BlyPWooz3tv6HBo66lGhra@homFtq5mo86ZujZ5mlqA/m5IEXm2o96NxuZQcWBIkDtiWVAMSCtWWfwH2gG1/80LvXE5LSqKkd1LiDTIzUnJ18hPL8oJwXM19XVVVTTUlZB4SSCeYm4QYo6AA "APL (Dyalog Classic) ‚Äì Try It Online")
[Answer]
# Haskell, ~~120~~ ~~84~~ 73 bytes
```
f x=do(v,u)<-zip['a'..'z']['A'..];1:r<-[[1|k<-x,v==k||u==k]];show$sum$1:r
```
[Try it Online!](https://tio.run/##DcrNCoUgEEDhV4kQpiCDtqWL3iIQFxMVif2R2R3Cd/e6OXyLs6Kz87bFuGQkp7N4K18K/plLAUJdwwdaQZ@ku6a9BVeqCVZwql4pbQg@VevOreePOb@z9MQdzSGv2xwPW3LEkUbsiYYhj38)
-36 bytes thanks to Unrelated String
-11 bytes thanks to Wheat Wizard
[Answer]
# [Scala](http://www.scala-lang.org/), 64 bytes
```
s=>('A'to'Z').map(c=>s.count(_.toUpper==c)).filter(_>0).mkString
```
[Try it online!](https://tio.run/##dVHdSsMwGL3fU3yrxSaylnW7EMQUhgiCwmBDBG9GmqZSzZrYZDI29uw1bdoqMnMVzm97ohkVtJbpO2cGnrgxvLqTu9Jo4HvDy0zDQik4jkYAX1QAa7kbWJuqKN@AJMMNjrUmCQoWgZHBa4CjLVWIkURHrQdtIiOfleIVIQzjKC@ErUKbZGqVHy6kBjj1RXxPt0pwbYPX/BNZFMCjLD8cFh6ECXizOJ55E4c/cCEkvMhKZGPHxnE8t4peEIbh@PLqwnfkX5R2nh6n/5@sK78@I@64eDpwjLE07dNn88GSppb5gS2Km//OZWWXbiSoKNXOTOwKyr4LzzDchsMkrYIys7Mzke5FnAFb6tRFKLuoEaVbDqDIAfUe8itXe2j5iMFv/c0X@U7lAReaN/T9arVcnVHAmIDfB3ltTds/OtXf "Scala ‚Äì Try It Online")
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell) 6+, ~~47~~ 46 bytes
*-1 byte thanks @Julian*
```
-join($args|?{$_-in'a'..'z'}|group{"$_"}|% c*)
```
[Try it online!](https://tio.run/##dZDPT4MwHMXv/Su62a2w0MWygycjxoueNHLYwRgCpUMWpNhCNPz427EdyKaL7/h57/te8i3EJ5fqjWdZj3bwGjY92Ys0t1AoE9XeNCggaY5DvF7jGndtIkVVNHMUzLt2AdnK7jsAPAsAx8Ih29X1LXawS6mLbYPuda@AWyGzeKYNSulGm4NHCJktVxdI89@AnpHQ3A4o/F@xmb46yxlML0fMGIuiQ527GYNRpOFEgA1buIANgFoozYuq9EuZ5okDEf8qOCt5rN@EgiEguaqyUoOl/p53Ej/YL0/@XaVK8f4Y7fXlqzfUGvkVY1wpUzV2EP5xnJhyzz8DY2wyHsyW4X9HO9D13w "PowerShell ‚Äì Try It Online")
[Answer]
# [Ruby](https://www.ruby-lang.org/), 48 bytes
```
->s{((?A..?Z).map{|c|s.upcase.count(c)}-[0])*''}
```
[Try it online!](https://tio.run/##KypNqvyfZvtf1664WkPD3lFPzz5KUy83saC6JrmmWK@0IDmxOFUvOb80r0QjWbNWN9ogVlNLXb32f4FCWrRSYnJaVZWjUqyygq6dgpGhoREXWNgjNScnXyE8vygnRREqaWhoaAxUAJZX19XVVVTTUlZJVIdKQrQl4gYpMDvMDf8DAA "Ruby ‚Äì Try It Online")
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 24 bytes
```
T`Llp`LL_
O`.
(.)\1*
$.&
```
[Try it online!](https://tio.run/##K0otycxL/K@q4Z7wPyTBJ6cgwccnnss/QY9LQ08zxlCLS0VP7f//xOS0qipHLo/UnJx8hfD8opwURS5dXV1FNS1lFTgjkSsRN0gBAA "Retina 0.8.2 ‚Äì Try It Online") Link includes test cases. Explanation:
```
T`Llp`LL_
```
Uppercase all letters and delete all other printable ASCII.
```
O`.
```
Sort the letters together.
```
(.)\1*
$.&
```
Get the lengths of all the runs.
[Answer]
# T-SQL, 168 bytes
```
SELECT STRING_AGG(c,'')WITHIN GROUP(ORDER BY
x)FROM(SELECT x,sum(1)c
FROM(SELECT substring(@,number,1)x FROM spt_values WHERE'P'=type)x
GROUP BY x)x WHERE x like'[a-z]'
```
**[Try it online](https://data.stackexchange.com/stackoverflow/query/1531147/return-all-letter-counts-as-an-integer)**
This will work for input fewer than 2048 characters. The output is ordered according to the position of the letter in the alphabet
[Answer]
# [Lua](https://www.lua.org/), 94 91 84 bytes
```
for i=65,90 do _,c=(...):upper():gsub(string.char(i),"")io.write(c~=0 and c or"")end
```
[Try it online!](https://tio.run/##DcnBCoMwDADQXwmeUijBi4JCD/uS0aXVBUYr0TLw4K9H3/X9WjRbqoKEcfBTD6nC23NAInJz27as6OZ1bx/cD5WyEn@jojjfdU4q/VWOjHyFHmJJwFD1iVySmUVezvN1Aw "Lua ‚Äì Try It Online")
[Answer]
# [Julia 1.7](https://julialang.org), 47 bytes
```
!x=join((c=count.('a':'z',lowercase(x)))[c.>0])
```
[Attempt This Online!](https://ato.pxeger.com/run?1=dY49TsQwEIVr-xSTBREbJcs6W4CQshIV3IACKCa2I3k1sqPEgSVXoUnBHmpvg1EQouFV8_e9eR_H_UgO5_k4xra8OV1lh3ofnBdC1zqMPq5FjvltPuUFhTfbaxysOEgpn_R6t3mRP9h9G3pw4Dz0Fg05bwchOSRhARZqGDpyUbgCVs9xtWy63vlIXiDUO8hQcuvNYjefPlG303THKqUq_mCJAjyGnkzGlFLbNOVlWWYXl2fnzPlXJGfS726MBaB_TxmGkSK4AVBr20VsyP4CyBTH_2VYdf33wDC1UVxr3TSJrLYcmyZ13-US9gs)
# [Julia 1.0](http://julialang.org/), 49 bytes
```
r='a':'z'
!x=join(([[email protected]](/cdn-cgi/l/email-protection)(in((r-32)r),x))[c.>0])
```
[Try it online!](https://tio.run/##dYvNisIwFIXXyVPcOmKToRVvuhCEiO7mDWahLm6TCJGYSlqh9OVrRRA3ntV3/i734An7cUw6p3yTDznPen1pfBTC6N2yvV/Fk1NZKZlk0Ut5MMvt6iTHc5PAg4@QHNngo2uF5DCJCnCgob0F3wlfwOzYzV7NLfnYhSgI9BYyktxFO5I5D8OeKUTF/1wIDfw3KdiMIWI1pbwsy2zx@zNnbyKGnL7LMrX@HFiGK@TGmLqenqriVNeTe@ID "Julia 1.0 ‚Äì Try It Online")
[Answer]
# [K (ngn/k)](https://codeberg.org/ngn/k), 23 bytes
```
{,/$#'=x@<x:("a{"')__x}
```
[Try it online!](https://ngn.codeberg.page/k#eJx9kVFLwzAUhZ/Nr8iy4VpZ1rVFlEZB8UWffBF8GGNL03Qri8lMUuk29Leb0jIcdbsEAt89uZeckyf7UTDoD++rh7sq8RDdo6E/n1ffANhkP5huf3SSQwgrslBr4i1yWghSkS3R/qzWTBFl+W73iAiKwjBCsxo9cyEUfFdaZD3XCMMwds2mhzHuXV71BxARb9Jf+D3PP+IUkRFqtfR0ZfXCm46uxuGkxYyxNKU1ieJWmKYOHggIwMrajUmCgKmML5XIx8ZStuYVW1G55GOmPoLPkhtbKGmCKL69juNAc1tqiakQWHBrucZMldIaTN2RuJCWL7kG4M29g0/UcANe5Ka08AKeqNfSuj5orDwtqx0Gf83tSluvwcHmjqKQX1QUmbvdyhGkcgs1N6WwsDCQMsY3lqaCHybQf5aAc8nACxcMOAKdAZMQNOmc/qyLCDR5ndfU9QuXl7Wz)
* `_x` lowercase the input
* `("a{"')_` drop all non-letter characters
* `x@<x:` sort the characters
* `#'=` build a dictionary mapping the distinct characters to the number of times they appear
* `,/$` convert the counts to strings, then join them (and implicitly return)
]