AppleScripts – Edit your iTunes Play Count

You might ask, why would I ever need to edit the play count of a song? That’s a valid question and this function is probably reserved for the more anal iTunes user but let me give you an example. Sometimes I begin listening to an artist through a ‘Best of’ Album. After a while I realise that I LOVE them and I decide to graduate to their studio albums. Now it annoys me to no end that the songs that I have been listening to on repeat on the Best of albums have no plays on the actual studio albums.

Yes, I’m that pathetic.

If you’re my kinda guy/gal here’s how you add a little script to iTunes to edit the play count of a song. I found the script on the Apple Forums so I thought I would share it here.

Scroll to the bottom if you’re …

** on a Windows machine.

** looking to change the play count of multiple tracks to one value I customised the script.

** you’ve just updated to Catalina.

(And… If you want more of this stuff. Head over to Doug – he’s the king of iTunes applescripts. He probably has a script you didn’t know you wanted. He’s active on twitter if you’re the type…)

1. Download the following file:


It should look like this:


2. Now save it in the follow directory:

Users > [User] > Library > iTunes > Scripts (create this folder if it doesn’t already exist)

**The name of the file is what will appear in your iTunes services Menu, I named mine ‘Change Play Count’ as you can see from the file name.


(Untitled is the name of my hard drive and chikaboo is the name of my user)

**If you can’t find your Library folder, when you’re in finder select ‘Go’ in the menu bar and hold down the alt/option key at the same time, it will appear in the list of folders.

3. Ta dah, you will now see the option in the scripts menu of iTunes! Just select a song and type in the number



** WINDOWS UPDATE 21/05/2018

If you’re on a Windows machine, someone contacted me with an application they made: Some instructions from the creator:

In a nutshell, you create a playlist with the songs you want to edit, fire this tool, select that playlist and then you have a grid with all the songs, double click the play count and change it, when you press ENTER it is saved to the iTunes library.

Thank you Mistico!



Someone requested the the script make it possible for you to select multiple tracks and change their play count value at one go. I have adapted the below script for that purpose. The process for installing it is the same as above.


** CATALINA UPDATE 09/10/2019

Someone has alerted me to the fact that iTunes has been removed in the latest macOS Catalina. I don’t know how I am going to cope with that – I am likely going to wait till my current 2015 Mac has COMPLETELY died before succumbing to this tragedy. Anyway for now I have done some research and I believe the script should still work with a few changes.

1. Download the same script (button below)

2. Open it with the ‘Script Editor’ App and change ‘iTunes’ in the first line to ‘Music’ (unfortunately I couldn’t do this for you because I don’t have the app on my computer)

3. Now save/move this file to:

Users > [User] > Library > Music > Scripts (create this folder if it doesn’t already exist)

Basically the same as before but changing all the ‘iTunes’ references to ‘Music’!


Join the discussion and tell us your opinion.

16th February 2017 at 3:57 pm

Hi Natasha, I tried to add this script but it’s giving me “A command name can’t go after this identifier.” With “played count” in the fourth last line highlighted. Any Help would be appreciated. Thanks!

Natasha Natarajanreply
16th February 2017 at 4:05 pm
– In reply to: Ben

Hey there!

I have changed the tutorial slightly and included a downloadable file of the script. Here it is:

Let me know if that works!

16th February 2017 at 4:10 pm
– In reply to: Natasha Natarajan

That worked perfectly! Thanks for the quick response and all the help. Really appreciate it!

Natasha Natarajanreply
16th February 2017 at 4:11 pm
– In reply to: Ben

No worries at all. I’m so happy that someone actually wants to change their play count and is reading this article – this is the best thing that’s happened to me all day. Hah. Have a good one!

16th February 2017 at 4:31 pm
– In reply to: Natasha Natarajan

I’ve been replacing older albums with remastered albums or deluxe editions so it was silly to start from “0” on all the albums I’ve been replacing. This is a great alternative to queuing the song 200x and skipping to the end 200x 🙂 I’m glad I found this post.

11th March 2017 at 4:55 am

This script was a godsend – thanks so much!

11th March 2017 at 3:05 pm
– In reply to: ie

I’m glad I could help!.. but mostly I’m glad I am not the only one needing to change my play count!!

27th May 2017 at 7:29 pm

Im confused on how to save it in itunes?

28th May 2017 at 8:16 pm
– In reply to: Mike

Hi Mike,
You should save it in this directory:
Users > [Username] > Library > iTunes > Scripts (create the Scripts folder if it doesn’t already exist)
Does that help?

3rd July 2017 at 11:07 am

As a person the likes to own and organise my music in the era of Spotify & co I´m so glad to finally find a script like yours.
Thank you very much

3rd July 2017 at 12:47 pm
– In reply to: Pedro

Pedro!! You made my day! If you ever want to give me some iTunes tips get in touch!

19th August 2017 at 6:29 am

Thanks, Natasha! This works just as intended on macOS 10.12.6 running iTunes Cheers!

1st October 2017 at 2:04 am

Worked for me too! Exactly what I needed to do. I had someone send me a song or two of an album and liking it a hell of a lot, I decided to buy the official album off iTunes. I deleted my downloaded ones and re-downloaded right off iTunes and had to set up my play count again. I’m definitely one of those “anal” iTunes people haha

6th October 2017 at 3:21 pm

I’m so happy to know I’m not the only one who worries about play counts! Always work on it when I have a song in “XXXX 0 single” album and then the actual album is released.
I found this script on the Apple forum as well, but I couldn’t manage to make it work. With your tutorial, there was no way to miss it. Thank you for this! You made my day 🙂

19th January 2018 at 9:07 am

Thank you so much Natasha! iTunes Match managed to screw up one of my favourite albums, and the only way to fix the problem was to reimport the CD – which I expected would mean losing my play count data for these tracks, which would flow on to ruin several smart playlists I have which rely on play count data. Your script saved me 🙂 Once again, thank you so much!

Dave Dayreply
6th February 2018 at 2:53 pm

Hi, Thank you for this. Unfortunately after modifying the play count, as soon as iTunes syncs to the cloud it will change it back to it’s original count. I wonder if it’s because I have an Apple Music subscription?

6th February 2018 at 3:00 pm
– In reply to: Dave Day

Hi Dave,
That’s really strange. I haven’t experienced any problems like that so I imagine it is because of your Apple Music Subscription. That seems weird thought because you would think your library play count would just be added to the cloud. I will do some googling and see if I come up with anything. I briefly read that it might take some time. Maybe a couple of hours?

Dave Dayreply
6th February 2018 at 3:33 pm
– In reply to: Natasha

Hi Natasha, as soon as iTunes syncs it reverts to the previous count. It’s as if Apple has a ‘the cloud is the truth’ policy. 🙂

6th February 2018 at 3:45 pm
– In reply to: Dave Day

Dave, I hate to say it but I think the cloud is slowly trying to ruin and take over our lives… 😬

22nd December 2018 at 4:22 am
– In reply to: Dave Day

Did you get this to work? I’m having the exact same issue 🙁

22nd December 2018 at 11:54 am
– In reply to: CM

I’m so sorry to hear that. I’m gonna look into it and see if I can find any solutions. I don’t have iCloud though so I might struggle… but I’ll do my best.

3rd March 2018 at 4:15 pm

I know this has been a while.. This seems like an amazing tool! By any chance, do you have a Windows version of this, or know of something similar? I am in a similar boat as you and some of the other posters, in terms of needing to adjust playcounts when Remasters are taken into account. If I have heard every song in the Van Halen album ‘1984’ over 300 times each, it makes no sense for me to start over at 0 if I am updating!

3rd March 2018 at 4:56 pm
– In reply to: Kevin

Hi Kevin! I love when people take interest in this blog post, makes me feel less alone in my anal iTunes library sorting. I think the way you’re going to have to do this is by editing your iTunes library xml file (some information on it here: Open it with notepad or another simple text editor, I don’t remember what the default one is on Windows anymore. Then find the songs and manually change the play count. That’s the only way I could think of. Let me know if it works.

9th May 2018 at 6:19 am
– In reply to: Natasha

Hello Natasha, I modified the play count in the XML file, but as soon as I started iTunes my changes were overwritten. I seems the XML file is regenerated each time iTunes starts and any updating is uni-directional. Any other ideas? Thanks!

9th May 2018 at 10:30 am
– In reply to: Mistico

Hey! Are you using a mac? Have you tried saving my apple script? I haven’t changed the play count using the XML file but I can look into it if the script doesn’t work.

9th May 2018 at 2:24 pm
– In reply to: Natasha

Hello, no, I am using Windows 7. Is there a version of the script for Windows? Thanks.

9th May 2018 at 2:33 pm
– In reply to: Mistico

I found this: Was developed a while ago so I wonder if it still works but I would be interested if you managed to get it up and running.

20th May 2018 at 12:09 am

Hello again Natasha, I built a tool to edit the iTunes play-count on Windows ( Thanks for all your help!

21st May 2018 at 12:16 pm
– In reply to: Mistico

That’s so cool!! Wow. Thank you. How does it work exactly? I am going to put a link to it in the article. Do you want any credits (name/website/anything else..)?

21st May 2018 at 5:37 pm
– In reply to: Natasha

You’re welcome! You should link to the instructions are there (the /releases page contains only the binaries). In a nutshell, you create a playlist with the songs you want to edit, fire this tool, select that playlist and then you have a grid with all the songs, double click the play count and change it, when you press ENTER it is saved to the iTunes library. Hopefully some one will find this helpful. Thanks again!

22nd May 2018 at 9:12 am
– In reply to: Mistico

Brilliant. You’re in the post now!

Scott Foubisterreply
18th July 2018 at 4:18 pm

Natasha, this is amazing! This is exactly what I have needed for a long time to combine play counts for duplicate copies of songs (from different albums/downloads), so I can deduplicate my iTunes library without losing my precious play count data. As you walk around today, no one in person will know that you are an AppleScript angel. But commenters on this page do, and we appreciate you!

19th July 2018 at 5:03 pm
– In reply to: Scott Foubister

You made my day!! It’s really the little things in life hey..?

14th August 2018 at 10:27 pm

Thank you so much for this! But there is a problem for me… I saved the script in the folder and there is also an icon of the script in the top bar of iTunes’ window. But when I push the “OK” button in the script plays are not changing at all. I’m getting the feeling i’m still doing something wrong… Can you please help me with this? Would really appreciate it
Thank you in advance!

15th August 2018 at 5:53 pm
– In reply to: Andrew

Hey Andrew. Thanks for getting in touch! I am emailing you directly a zipped file of the script I have installed on my computer. I just double checked that my script still works, and it does. I am running iTunes on my Mac. Let me know what happens.

Josuke Higashikatareply
10th September 2018 at 1:32 am

Thank you SO SO SO much for this! I’m one of those “anal about iTunes” people and recently my most played song of all time got corrupted somehow. The past month or so I’ve just gone without listening to it rather than replace it because I didn’t want the play count to drop down to zero. I’ve also been meaning to upgrade a lot of my music to 320kbps versions so this will come in handy there as well.

What connects Claude Debussy, Ella Fitzgerald & Melba Doretta Liston? – Chikaboo Designsreply
3rd October 2018 at 1:31 pm

[…] iTunes library; turns out there are other music crazies on the internet who’ve gone mad for AppleScripts – Edit your iTunes Play Count. I love the internet, it makes me feel less […]

15th February 2019 at 7:41 pm

Omg this is going to save my sanity! Thank you so much for sharing!!!

15th February 2019 at 8:27 pm
– In reply to: Krista

so happy to help!

16th February 2019 at 12:34 am

Great, thanks very much for making this available. I had an old version of a similar script from another developer that hasn’t worked with the more recent versions of iTunes so I really appreciate your efforts!

16th February 2019 at 11:40 am
– In reply to: Dominic

my pleasure

21st February 2019 at 8:43 pm

Thank you for this script! I have been looking for an easier way to update play counts and this script is the answer! Works great!

23rd February 2019 at 1:29 pm

I normally don’t leave behind comments but it needs to be said that the ease of the tutorial, not to mention to find a fellow iTunes Nerd, are very much appreciated. Thank you!

23rd February 2019 at 1:31 pm
– In reply to: Ken

That’s so kind!!

6th March 2019 at 1:08 am
– In reply to: Natasha

Unfortunately, my play counts have returned to their previous number. 🙁

6th March 2019 at 10:22 pm
– In reply to: Ken

Oh no! Someone did comment that before actually. I think it had something to do with Apple Music. Could it be to do with that for you? Does it return to the previous number immediately?

7th March 2019 at 2:07 pm
– In reply to: Natasha

Oh… I do have Apple Music. It doesn’t change it immediately, sometimes it sticks but it does change on another device I am using and then it will eventually change at one point or another. 🙁

8th March 2019 at 8:30 pm
– In reply to: Ken

I’m afraid I haven’t yet figure out the solution this problem. I’m sorry about that. There seems to be some way in which Apple Music syncs music that conflicts with manually changing the play count!

Kym Taylorreply
1st April 2019 at 2:38 am

Thanks so much for this tip! I was a bit leery at first – but I went ahead and created a Scripts folder where you said. Then I quit iTunes, restarted it, and Presto! there was my little script menu! Now when songs are remastered, and I replace the old version with the new one, doesn’t think I’ve never listened to it before! Yes … that matters to a geek like me. Thanks again – wonderful feature!

1st April 2019 at 3:05 pm
– In reply to: Kym Taylor

My pleasure 🙂 omg love that you’re concerned about too!!!

5th April 2019 at 8:34 am

Thanks so much for this! I couldn’t find anything like it on Dougscripts and came up empty, fortunately found it here here, still can’t find it there. I got “This Is The Last Song” there, (love it, wish there were an iOS app for it) and yes, there’s just so much goodness on that site. Best!

14th April 2019 at 4:39 pm
– In reply to: Dean

Strange! I actually wrote to him once to tell him to link to my site and he said he already had a script on his own. Anyway glad you found what you were looking for.

Pranay Wadhavareply
5th July 2019 at 12:19 pm

I does work, it changes the play count but it won’t stay forever. it goes back to the original one after sometime, idont know how. maybe after I reopen iTunes or maybe after it refreshes itself, but the edited play count won’t stay forever. Please help regarding this and Thankyou.

5th July 2019 at 1:31 pm
– In reply to: Pranay Wadhava

That’s so strange. Are you using Apple Music? If you are, that can sometimes cause problems! Some other people have had a similar problems. I am not sure what the solution is to be honest!

Dean Donofrioreply
31st August 2019 at 1:33 am

Natasha, you are a GODSEND! I have been wanting to change the play counts for YEARS, as they are crucial to my listening experience, ha ha. I recently had to re-download over 1000 songs, which all have a 0 play count, so it messes up my playlist system. Thank you!!!!

1st September 2019 at 4:09 pm
– In reply to: Dean Donofrio

haha I love music/iTunes geeks like you 🙂 So so so so so happy to help.

Hardy Treply
8th October 2019 at 7:51 pm

Hey Natasha, 🙂 Love what you’ve done and love the script, been using it for a long time now. Just updated to MacOS Catalina and sorry if this has been asked already and/or if you’ve already answered this question, but now that iTunes is “gone” and Apple Music is the new official app for Music on the mac, what’s the word on getting this script working for Catalina? Apple Music is basically the same as iTunes with a little flare added to it, but I know nothing about programing or scripting, so was just seeing if there was an ETA on the script. Be happy to help in any way I can. 🙂 Thanks!

9th October 2019 at 12:26 pm
– In reply to: Hardy T

Hi there! So glad you’ve been enjoying the script. I did a little research and have added a little update to the end of the post. PLEASE have a go and let me know if it works. I don’t have access to Catalina to try it out myself.

Hardy Treply
9th October 2019 at 8:51 pm
– In reply to: Natasha

SUCCESS! Thank you so much! I missed a step and didn’t see to make a new “Music” folder, but after I caught that it loaded right up. Just tested it out too and it works just fine. Thanks again!

9th October 2019 at 9:11 pm
– In reply to: Hardy T

I’m so pleased to hear that!

Leave a reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.