# How to count Albums

**URL:** https://community.mp3tag.de/t/how-to-count-albums/55350
**Category:** Support
**Created:** [December 3, 2021, 10:51am UTC](https://community.mp3tag.de/t/how-to-count-albums/55350 "2021-12-03T10:51:33Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![reddwarf4ever](https://community.mp3tag.de/user_avatar/community.mp3tag.de/reddwarf4ever/32/22473_2.png) [@reddwarf4ever](https://community.mp3tag.de/u/reddwarf4ever)
#### Post date: [December 3, 2021, 10:51am UTC](https://community.mp3tag.de/t/how-to-count-albums/55350/1 "2021-12-03T10:51:33Z")

</div>

Found various solutions whilst searching the internet, but none I have tried work. Need a way to count how many albums here are, can someone help please ?

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [December 3, 2021, 11:03am UTC](https://community.mp3tag.de/t/how-to-count-albums/55350/2 "2021-12-03T11:03:15Z")

</div>

Mp3tag doesn't count albums. It works with individual tracks.

What you can try is to export a list of your tracks, sorted by album and then count them externally:

> [@Count total number of albums](https://community.mp3tag.de/t/count-total-number-of-albums/12486):
>
> Is there a simple way to use MP3tag to count the total number of albums in my tagged music collection? I have several hundred albums, all in one big directory. I need to count the total number of albums seen by MP3tag so I can compare that total with the total seen by my network music player via the music server in my NAS drive.

---

<div class="post-metadata">

### Author: ![reddwarf4ever](https://community.mp3tag.de/user_avatar/community.mp3tag.de/reddwarf4ever/32/22473_2.png) [@reddwarf4ever](https://community.mp3tag.de/u/reddwarf4ever)
#### Post date: [December 3, 2021, 11:53am UTC](https://community.mp3tag.de/t/how-to-count-albums/55350/3 "2021-12-03T11:53:22Z")

</div>

Did you find a solution ? Be handy if this was built into the “view” option  
I.e. view album total and view track total  
Thanks

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [December 3, 2021, 11:55am UTC](https://community.mp3tag.de/t/how-to-count-albums/55350/4 "2021-12-03T11:55:28Z")

</div>

> [@reddwarf4ever](#):
>
> Did you find a solution ?

Yes in the linked thread, the second answer gives you an export script for it:

> [@Count total number of albums](https://community.mp3tag.de/t/count-total-number-of-albums/12486/2):
>
> please try this I hope it helps $filename(mp3.txt)$loop(%album%,1)$if($eql($strstr(%\_extension%,mp3),0) ,,%\_counter% - %album%) $loopend()

---

<div class="post-metadata">

### Author: ![ohrenkino](https://community.mp3tag.de/user_avatar/community.mp3tag.de/ohrenkino/32/4843_2.png) [@ohrenkino](https://community.mp3tag.de/u/ohrenkino)
#### Post date: [December 3, 2021, 11:56am UTC](https://community.mp3tag.de/t/how-to-count-albums/55350/5 "2021-12-03T11:56:43Z")

</div>

The good thing about the export function is that you can generate more or less any grouping.  
You want so see the album, others may want to count artists, genres, bitrates, album sizes, track lengths. You name it.  
So: use the export function, create a script, tick the option to see the result immediately and there you are.

---

<div class="post-metadata">

### Author: ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)
#### Post date: [December 3, 2021, 5:21pm UTC](https://community.mp3tag.de/t/how-to-count-albums/55350/6 "2021-12-03T17:21:30Z")

</div>

> [@gesamtzahl alben für text export?](https://community.mp3tag.de/t/gesamtzahl-alben-fur-text-export/6483/2):
>
> Hat dein Code auch eine vernünftige Ausgabedatei erzeugt? Probiere es 'mal hiermit ... $filename(O:\TEST\Test.Export.txt,ANSI)$loop(%artist%,1)$repeat(=,80) Artist : $upper(%artist%) $repeat(-,80) $loop(%year%%album%,1)Album : $upper(%album%) Erschienen: %year% Tracks : $loop(%track%)$repeat( ,12)$num(%track%,3). %title% $div(%\_length\_seconds%,60):$num($mod(%\_length\_seconds%,60),2) $loopend() Tracks : %\_total\_files% Dauer : %\_total\_time% $repeat(-,80) $loopend()SUMME (%artis…

---

<div class="post-metadata">

### Author: ![reddwarf4ever](https://community.mp3tag.de/user_avatar/community.mp3tag.de/reddwarf4ever/32/22473_2.png) [@reddwarf4ever](https://community.mp3tag.de/u/reddwarf4ever)
#### Post date: [December 3, 2021, 5:56pm UTC](https://community.mp3tag.de/t/how-to-count-albums/55350/7 "2021-12-03T17:56:44Z")

</div>

Sorry, am English and don’t understand  
Sorry

---

<div class="post-metadata">

### Author: ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)
#### Post date: [December 3, 2021, 6:35pm UTC](https://community.mp3tag.de/t/how-to-count-albums/55350/8 "2021-12-03T18:35:07Z")

</div>

> [@reddwarf4ever](#):
>
> orry, am English and don’t understand

There are only 2 rather irrelevant sentences in German which can eaysily translated via Google Chrome:

> Did your code produce a reasonable output file too?
> 
> Give it a try with this

The rest is an example of an export script (in Mp3Tag export language) to count albums, tracks and total time. and saves it to a text-file. You only have to change the output path for the exported text-file in the first line to your needs.

---

<div class="post-metadata">

### Author: ![reddwarf4ever](https://community.mp3tag.de/user_avatar/community.mp3tag.de/reddwarf4ever/32/22473_2.png) [@reddwarf4ever](https://community.mp3tag.de/u/reddwarf4ever)
#### Post date: [December 3, 2021, 11:40pm UTC](https://community.mp3tag.de/t/how-to-count-albums/55350/9 "2021-12-03T23:40:08Z")

</div>

Thankyou for your help, it’s just the German, I just don’t understand what I am to do with the code.

Thanks

---

<div class="post-metadata">

### Author: ![poster](https://community.mp3tag.de/user_avatar/community.mp3tag.de/poster/32/4881_2.png) [@poster](https://community.mp3tag.de/u/poster)
#### Post date: [December 4, 2021, 6:22am UTC](https://community.mp3tag.de/t/how-to-count-albums/55350/10 "2021-12-04T06:22:36Z")

</div>

> [@reddwarf4ever](#):
>
> I just don’t understand what I am to do with the code.

Have a look at your help-file in MP3Tag (F1) at the section "Export".  
[https://docs.mp3tag.de/export](https://docs.mp3tag.de/export)

Short explanation:  
Copy the code to the clipboard.  
In MP3Tag goto File-\>Export-Button for new export file  
Give the nerw file a name, e.g.: Count my albums, o.k.  
Paste the code  
Change the path in the first line to an existing path in your environment  
Save the code  
Goto File-\>Export and start your new created export file out of the list you see

More settings and explanations for export are in the help.

LyricsLover's example for the export file ist much simpler code and concentrates on album-name and counting.

---

<div class="post-metadata">

### Author: ![reddwarf4ever](https://community.mp3tag.de/user_avatar/community.mp3tag.de/reddwarf4ever/32/22473_2.png) [@reddwarf4ever](https://community.mp3tag.de/u/reddwarf4ever)
#### Post date: [December 4, 2021, 11:00am UTC](https://community.mp3tag.de/t/how-to-count-albums/55350/11 "2021-12-04T11:00:07Z")

</div>

Hello

Thanks, is this to be used in the file export option ?  
Bit new to the more advanced side of MP3Tag

---

<div class="post-metadata">

### Author: ![reddwarf4ever](https://community.mp3tag.de/user_avatar/community.mp3tag.de/reddwarf4ever/32/22473_2.png) [@reddwarf4ever](https://community.mp3tag.de/u/reddwarf4ever)
#### Post date: [December 4, 2021, 11:01am UTC](https://community.mp3tag.de/t/how-to-count-albums/55350/12 "2021-12-04T11:01:31Z")

</div>

Hello

Where do I put the destination location for the count ? Thanks

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [December 4, 2021, 11:04am UTC](https://community.mp3tag.de/t/how-to-count-albums/55350/13 "2021-12-04T11:04:18Z")

</div>

You don't have to put a destination location. The result file "mp3.txt" will be opened automatically with your associated \*.txt viewer, like notepad.

If you want to have it in fixed directory, use the example from posters linked code and add it the in front of the filename, like `c:\Temp\mp3.txt`

---

<div class="post-metadata">

### Author: ![LyricsLover](https://community.mp3tag.de/letter_avatar_proxy/v4/letter/l/c6cbf5/32.png) [@LyricsLover](https://community.mp3tag.de/u/LyricsLover)
#### Post date: [December 4, 2021, 11:23am UTC](https://community.mp3tag.de/t/how-to-count-albums/55350/14 "2021-12-04T11:23:48Z")

</div>

> [@reddwarf4ever](#):
>
> Thanks, is this to be used in the file export option ?

> [@Count total number of albums](https://community.mp3tag.de/t/count-total-number-of-albums/12486/2):
>
> `$filename(mp3.txt)$loop(%album%,1)$if($eql($strstr(%_extension%,mp3),0) ,,%_counter% - %album%) $loopend()`

Maybe this one can help you to understand [what poster already wrote step by step](https://community.mp3tag.de/t/how-to-count-albums/55350/10) and what you find in the linked export-help:

![Mp3tag - Create Export2 script](https://community.mp3tag.de/uploads/default/original/2X/a/a882316215e1c9550d14fb92ae0b89eaea1ef6bc.gif)

---

<div class="post-metadata">

### Author: ![system](https://community.mp3tag.de/uploads/default/original/2X/c/ce7035d426cb755a7916793326d23b465222a407.png) [@system](https://community.mp3tag.de/u/system)
#### Post date: [February 21, 2025, 4:49pm UTC](https://community.mp3tag.de/t/how-to-count-albums/55350/15 "2025-02-21T16:49:41Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
