Counting Layers In Photoshop
Have you ever wanted to know how many layers are currently in your .pdf/.psd file? Simple, the answer is 3, or 8 or even 17. I’m not talking about simple files like this one.
Ok, so clearly you can work that one out for yourself…. theirs three layers in that file. How about this file?
So this image is a bit more of a strain to count, it would probably take five, maybe ten minutes to count the layers. Theirs only 45 layers but this can all take time if you have to count them yourself. What if your images start to get really big (not filesize) but regards layers. Do you really have the time to count hundreds of layers? Would you have the patience?
The following will help you get around this!
Photoshop Layer counting script – This script will count all the layers for you automatically!
So I’m sure you want to know how to use this?
It’s simple!!
- Right-click the above link and download the script to your desktop
(or somewhere you will remember) - Open up Photoshop with the file you wish to count
- Click on ‘File’
- Then ‘Scripts’
- Now click ‘Browse’
- Find the script you just downloaded to your desktop and click Load
- You will now be prompted with ‘Go through your file and count all the layers??‘
- Click ‘Yes’
- You will now be informed of the amount of layers in your file!
Job done, that was a lot quicker than counting 20-5,000+ layers now wasn’t it?
I hope this script speeds up your photoshopping someday
This script is used at your own risk, I have personally used it many times but shall not be held responsible for any misbehaviour caused by it!


May 26th, 2008 at 6:30 pm
Not sure why you would need to know how many layers you have, but actually attempting to work with something like that seems so very very daunting to me.
May 26th, 2008 at 8:22 pm
Hey Phil,
Sometimes in projects/competitions a file under 10mg would be asked, the odd time people like to make it a little quirky by saying ‘less that three layers’. Obviously people can just merge some of the layers but that would be pretty easily noticed when judging the final .psd/.tiff.
I’ve also seen 1/2topics on some forums asking the question “Is there any easy way to find out how many layers I have in Photoshop?” – so I thought I’d write this easy article. I’ve never actually had to use this myself but was always interested in finding out how many layers I used in the picture used above.
Thanks for posting Phil!
Kyle
May 31st, 2008 at 7:35 am
Thanks for this script bro! I usually have hundreds of layers in a project and it’s hard to keep the count in track. I need the layer count for my portfolio
June 1st, 2008 at 11:33 am
nice tool Kyle!
i was having a hard time counting all the layers of the vectorized photo i’m working on. then i thought, there must be an easy way to count all these layers. and your script was the answer!
it had 274 layers all in all. thanks man!
June 2nd, 2008 at 5:31 pm
Glad it helped lads
June 2nd, 2008 at 7:38 pm
beautiful! thank you very much!
June 4th, 2008 at 3:56 am
thanks! this was really useful, I do vector art with photoshop and I use ~500 layers depending on the source photo and I like to know how many I’ve run up.
July 30th, 2008 at 11:57 am
Thanks …just what I was looking for!
Current document: 1107 layers !!
August 3rd, 2008 at 7:17 am
Thanks for this! I’ve been curious about layer amounts before but only recently has it become a requirement, so this is going to come in very useful. I appreciate you sharing this.
August 12th, 2008 at 10:26 pm
Hey Kyle!
Thanks for this script, not that I needed it but I was curious about my latest project file. Now my question is: does it count all the layers that are in groups too? or is a group counted as one layer?!
Cheers, phil
August 13th, 2008 at 8:38 pm
Thanks for the comments lads.
Phil,
Sorry I forgot to mention in the original post, All layers will be counted even if their in a group. There’s one little snag though, the group itself will be counted as a layer. So if you have two normal layers and then two more layers in a group, you will be told that you have five layers…
I hope that answers your question!
September 28th, 2008 at 11:33 pm
Hey Kyle, thanks for this script! Curiosity gets the better of me some times and this is really handy!
November 2nd, 2008 at 4:29 pm
Thanks man, this is pretty much exactly what I needed.
I broke my record this morning, up to 45 layers in this (maybe another 20 to go…). I wasn’t about to make the habit of counting how many myself. Great script.
Thanks a ton, dude!
November 24th, 2008 at 2:20 pm
Thank man, great job on the script. I layer stack photos one at a time for work, and at the end i need to know how many object (layers) i have. this just made my life a whole lot simpler. thanks bro.
November 25th, 2008 at 12:22 am
I’m glad the script helped guys!
Kyle
December 10th, 2008 at 12:09 am
Thanks Kyle-
265! Will have to try it on some of my bigger files as well.
December 10th, 2008 at 12:17 am
No problem Jeremy. Some cool animations on your site!
Keep up the good work!
Thanks for stopping by!!
Kyle
December 12th, 2008 at 3:29 pm
Hi!
Real nice sript. It is very useful since I rarily work with files with less than 200 layers and its always nice to know how many layers there are in the project.
There is a problem though – If I have a file with 1000 – 5000 layers (which happends when designing a hefty website) – it takes way too long for the scrit to count them and there is no way to cancel the script or see how far in the progress the counting has come. Is this something you could develope? It would be much appreciated.
Otherwise I will have to initiate the script when I leave a friday night and see the result on monday morning. ^^
/André
December 12th, 2008 at 3:37 pm
Hi André,
I’m glad you like the script! Wow 1-5k layers for a website? As a web designer myself I’m stunned that you could have something that colossal. At the moment I’m swamped with work so I won’t be updating the script any time in the near future.
Sorry!
From a web design point of view maybe break all the pages on the website up into seperate files. So have .psd for your homepage, one for your contact page etc?
Hope that helps,
Kyle
December 19th, 2008 at 3:12 pm
Reply –
I see, its a pity you won’t continue with the script soon. This is actually the top search at google for photoshop layer count =) A progress bar would be useful, and a step in the right direction in user-friendlyness ^^
The reason I don’t really split my projects into numerous files is simple – I have a monster machine of a computer and get no lesser performance in high layer count. Lately I have had to split sited and designs up though, due to other people using my design source files. I definitly see a great point to it.
Even so, I seem to get a really high layer count, with layer compositions, graphic source-files, notes-layer-groups, work-groups and replicated groups used all over the design.
When I get the time, maybe I will continue on your script and add these things =) Regardless, I will link to this blog from my own site (not yet operational).
Thank you however. /André
December 20th, 2008 at 10:15 pm
sup kyle
thanx for the script man, im doin some vector work and i wanted to know how many layers i had, just wanna ask does it count layers inside smart objects too?
thanx for the script man, 134 layers and counting!
February 13th, 2009 at 4:02 pm
Kyle, your script is extremely appreciated! 697 layers I did not have to count!!!!! Kudos!
February 15th, 2009 at 12:45 am
Great article, adding it to my bookmarks!
February 25th, 2009 at 1:18 am
Thanks man…..I wish it didn’t count the Groups. Is this possible? Future version maybe?
February 25th, 2009 at 1:21 am
Hey Dustin,
Thanks for the comment. I may update it in time to come.
In the meantime you could always just delete the group in question before you run the script and then undo.
MAKE SURE to have a backup of the file, just in case!!
February 25th, 2009 at 10:47 am
Dustin-
Actually, I think groups should and must be included in the layer-count since they actually fill as vital functions as a layer do, not just folders and categorizers. If I use a group to mask all its content or something like that – shouldn’t that count as a layer? In that case, should really clipping masks and adjustment layers count as well?
I think its just as valid in the count as regular layers =)
Still using the script – awesome.
February 25th, 2009 at 1:15 pm
I’d agree with you Dustin!
I use a fair amount of groups and it’s purely for structure/organising. I always need the layers within my groups
February 25th, 2009 at 8:07 pm
Hey very nice blog!! I will bookmark your blog..
March 30th, 2009 at 3:11 pm
Wow, thanks. This script is great. I just used it on a doc with 266 layers in Photoshop CS4. Works like a charm! I found this just by searning Google for “how many layers in my PSD.”
Thanks!!
March 30th, 2009 at 5:01 pm
Glad it helped Joel
April 13th, 2009 at 5:19 pm
Thanks This Is Very Very Useful.
April 22nd, 2009 at 1:36 pm
Great script!
thanx a bunch…
working on some complicated website UI designs, with loads of grouped layers.. thought I had about 100 or so layers.
Once I ran the script and the result was 375 layers….
I wish Photoshop had a layer index numbering like After effects does, just before the layer name, as well as a lock right there and not at the top of the layers palette.
Could a script count the groups as well like a hierarchy list?
Counting the topmost groups, the sub groups and all the layers?
tks
April 23rd, 2009 at 10:54 pm
Crashed my CS3 :p
April 24th, 2009 at 12:39 am
Sorry to hear that bob. I’ve used this well over one hundred times on different files in CS3 and never had a problem. It might have been something else… or a plugin that conflicted with it perhaps?
April 24th, 2009 at 8:12 am
Bob, I thought I got that behaviour as well.. but it turned out it was still counting the layers. It freezes PS and doesn’t show a progress bar so its hard to know what its up to.
If you have 500 + layers, it might take some time for it to finish counting.
April 24th, 2009 at 9:24 am
yeah.. a progress bar with the layer numbers dynamically counting would be cool.
April 24th, 2009 at 9:35 am
Evan, indeed =)
May 8th, 2009 at 1:41 am
WOW. This script just made me squeal with glee. This is PRECISELY what I needed for digital painting. I’m trying to get into the habit of keeping all my layers, and this just sold me. In return, a link to the image I just finished and used your script to count layers in.
(88 was the count, incidentally. Though I did some thorough merging at the bottom.)
May 8th, 2009 at 2:01 am
Sweet image Joe! Glad the script helped you!
May 12th, 2009 at 8:33 pm
super useful, thanks!
May 31st, 2009 at 4:34 pm
Works fine for me when there only a couple of hundred layers, but it crashed my CS4 when i tried it on real big files. Will try it again on a faster pc when i’m at work.
June 21st, 2009 at 1:53 pm
Nice script, thanks for sharing!
August 8th, 2009 at 1:03 pm
Many thanks for this script!
I am working on a new project which is probably the graphically intensive one I’ve done to date. I’m not half way through the layout and already have over 200 layers.
Thanks again.
aFX-D.
November 15th, 2009 at 10:27 pm
[...] gibt ein Skript, das für euch die Ebenen zählt. Das habe ich auf dieser Seite gefunden: Kyletunneyphotography-Blog. Hier der Direktlink zum Skript. Es kann sein, dass Eurer Browser das Skript nach dem Download aus [...]
November 16th, 2009 at 9:20 pm
Hmm, posted May 2008, and still highly usable!
Just started a photo manipulation and it’s on 185 layers! :> That indeed, was faster than counting myself!
Thank you (:
November 16th, 2009 at 11:43 pm
Glad to help Danny!!
November 17th, 2009 at 3:22 am
I downloaded it, but it’s so slow that I literally waited 15 minutes and it was still counting. It’s relatively pointless, as any number that’s too hard to count is just too much for this script to handle.
November 17th, 2009 at 11:19 am
Hi Dalton,
Sorry to hear the script is a bit sluggish for you. You can see from the comments above that it works on files up to 1,000 layers with absolutely no problems. This script was written more than a year ago with the idea to help the average graphic designer/photographer to count their layers in photoshop. Theirs probably only a handful of people who would go over 1,000 layers in photoshop. Sorry this didn’t do the trick for you.
Kyle
November 17th, 2009 at 11:20 am
Dalton, yes I agree. I sometimes need to initiate the script when im off from work and see the result when I get back the next day. A good day I can leave it on when I gof to lunch though.
I think this script is best suited for files with less than 200 layers. At least until a feature with progressbar is developed – or things are just optimized really well (havn’t read the script very thuroughly so I don’t know the extent of current optimization).
November 18th, 2009 at 6:41 am
Keep up the good work.
November 23rd, 2009 at 1:58 am
I think this is a wonderful script! I have always manually counted the layers which is daunting. Some may not understand why one would need to know how many layers, but sometimes bragging is enough.
Thank you for this.
November 30th, 2009 at 6:48 am
OMG!! Thanks a bunch!!
I’ve been looking for something exactly like this!!
:]
December 4th, 2009 at 11:43 am
[...] nice fellow name Kyle Tunney posted a script on his web site some time ago which does all this for you. Running the script on [...]
January 1st, 2010 at 12:08 am
This is awesome i started to count layers but i found this script and worked great.
Layer count on a Virtual DJ skin im making: 985
Thanks to the creator of this script
January 8th, 2010 at 1:32 pm
1059 layers and counting
To be fair that’s split over 30 layer comps
January 8th, 2010 at 2:06 pm
Glad to help guys!
January 23rd, 2010 at 10:32 pm
Thanks for the script, just used it in Photoshop CS4 and I have far more layers than I thought!
March 4th, 2010 at 12:46 pm
Just what i needed…tnx a lot!
March 23rd, 2010 at 1:00 pm
Vielen Dank.
March 25th, 2010 at 5:36 pm
hey kyle,
would love it if your script would give a more detailed output. as for my work it would be great to see the count of visbible vs. unvisible
layers. e.g. ( your doc has 101 layers / 23 visible)
an option to count folders and their content as one layer opposed to count all layers regardless of their structural order would be great, too. last but not least if the script could run as a panel similar to the “info” constantly giving out layer and (un)visible count i’d be perfekt.
i appreciate your work.
greetz
March 25th, 2010 at 5:59 pm
Great idea Stefan. I’d love to work on this a bit more but have so much going on at the moment with work that it’s hard to find the time. Hopefully sometime in the future!
Kyle
May 14th, 2010 at 7:17 pm
Hi!
Thanks a lot for this script. It is actually very useful to me. Do you guys know if its any way tho to modify it to count the photoshop groups instead of the layers? That would be so awesome to me to be able to count the groups.
Thanks!
Em
May 18th, 2010 at 11:05 pm
Hi Em,
I’m sure it’ i possibly but I’m afraid I don’t have the time to update the script at the moment.
Kyle
May 20th, 2010 at 4:49 am
would love it if your script would give a more detailed output. as for my work it would be great to see the count of visbible vs. unvisiblelayers. e.g. ( your doc has 101 layers / 23 visible)an option to count folders and their content as one layer opposed to count all layers regardless of their structural order would be great, too. last but not least if the script could run as a panel similar to the “info” constantly giving out layer and (un)visible count i’d be perfekt.i appreciate your work.
+1
August 13th, 2010 at 11:33 pm
I just created an extremely complicated Info-Graphic to explain the movie ‘Inception’ for a contest on FastCompany.com, and I am super, super-grateful for this script. Thank you so much Kyle, from the bottom of my heart.
August 14th, 2010 at 5:45 am
wow, that was a great help, nice use of photoshops “script” feature!!!!
November 21st, 2010 at 10:38 pm
thanks! This script should be included in photoshop itself. Btw. My psd has 530 layers so far.
December 1st, 2010 at 4:10 pm
Cool, thnx!
December 1st, 2010 at 6:22 pm
Glad to help guys!!
Happy counting your layers!
Kyle
December 5th, 2010 at 4:14 pm
Been looking for something like this for AGES!
111 Layers, at the moment, by the way,
December 20th, 2010 at 1:34 am
This did not only make PS CS5 crash for me but also destroyed the file i was working on. Glad I backed it up before trying this out.
December 29th, 2010 at 3:48 am
What’s up Kyle,
Have one question? – What about this script supporting Photoshop CS5? I been working with older version of the photoshop, like CS3 before, and this script worked with no doubt sickest script on the PS, but when I decided to move on the further, newer version such as CS5, this script seemed to crash ps cs5 while it counts my layers, so is this script only for the older photoshop versions, or it’s something to do with me or my photoshop & computer?
Waiting for your feedback,
dldesign.
December 29th, 2010 at 4:01 am
What’s up Kyle,
Have one question? – What about this script supporting Photoshop CS5? I been working with older version of the photoshop, like CS3 before, and this script worked with no doubt sickest script on the PS, but when I decided to move on the further, newer version such as CS5, this script seemed to crash ps cs5 while it counts my .psd file containing 1000-2000 layers in it, so is this script only for the older photoshop versions, or it’s something to do with me or my photoshop & computer?
Waiting for your feedback,
dldesign.
January 3rd, 2011 at 11:11 am
Hi Daoud,
Apologies that this script supposidly destroyed your file but from the amount of use this script has got this is the first time has ever happened. The script doesn’t write anything to the file, so I can’t see how this could have destroyed it on you…
Hi Laury,
Thanks for your comment. I haven’t been updating the script or testing it on newer versions of Photoshop. I’ve just tested it on Photoshop CS4 and it works perfectly. There might have been a change in how some parts of PS-CS5 have been coded which stop this script from working correctly. I’m afraid I don’t have the time to work on upgrading the script….. Have you tried using it on a few different psds/tiffs, one’s with different count of layers etc?
Thanks for stopping by guys,
Kyle
January 3rd, 2011 at 5:45 pm
Thanks for the feedback first of all buddy,
Well everything is aight with my file, because I saved it before counting all the layers, thankfully hah. You know, it’s kind of weird shit happens, when I open that script. Once I’ve opened it and clicked on ‘OK’ button in the little window which ask you ‘Count all the layers?’ or something like that, for that time it seems to be everything fine, but after about 5 or even 10 seconds my photoshop cs5 stops responding, and I just have to shut it down.
Anyways, I’ll try it with 20 or 30 layers, it might be because of lots of layers or something.
Thanks once again, best regards,
laurynasl.
January 28th, 2011 at 4:58 pm
I just used this script with Photoshop CS5 and it worked amazingly well. I had an illustration composed of logos supplied by a client and I wanted to be sure they were all used in the finished product so I compared numbers in the folder of logos and the finished artwork. 199 layers, it matched and I can stop worrying if I included them all. Thanks!
March 9th, 2011 at 8:14 am
thank you very much
this is very usefull!
June 3rd, 2011 at 4:19 pm
very nice script, thanks for that! i usualy try to keep the layers down as much as possible, cuz i cant get quiet laggy. thanks god there are smart objects! my last file had 1400 layers
July 13th, 2011 at 9:11 am
PS CS5 – TIFF – LZWcomp – 1043 Layers – 3 min. to read
works nice : ) thx!
August 12th, 2011 at 8:41 am
Genius!!!!!!!!!!!!!!!
August 27th, 2011 at 6:45 pm
Thanks for the littel tip
Fun to see who much you have done..
So far my counter gets to: 1419
(Image)
http://peecee.dk/upload/view/324069
September 11th, 2011 at 11:07 pm
Thank you:) it worked perfectly.
October 19th, 2011 at 12:57 pm
Seems that this script freeze psd if there is more than some 300 layers
October 24th, 2011 at 8:21 am
Hey,
Thank you for this script! When I downloaded on mac for some reason it was converting it to a .txt file. I renamed the file and got rid of it and it works! This is very helpful for comparisons and making sure you have included everything in a project. Thank you very much!
Layers: 106!
December 25th, 2011 at 5:48 am
This just made my job a tad easier, thank you!
March 14th, 2012 at 6:17 pm
The only problem with this script is that it froze my system and didn’t count the layers in my Photoshop document.
0/10
March 18th, 2012 at 1:57 pm
A WONDERFUL script. Thank you for the effort of making this and sharing it.
March 31st, 2012 at 4:00 am
Great script! Thank you for the effort of writing it!
April 6th, 2012 at 4:09 pm
Thank you sir! I had a photoshop file with multiple website mockups in it. It was getting to be over 300mb so I was curious how many layers it had. Turns out it was 492 LOL. Glad I didn’t have to manually count that
April 12th, 2012 at 12:49 am
its amazing
thanks
is there any way to merge it with the Photoshop
i mean open any menu and find it and simply press on it
another question:
can i use it with illustrator ? and if not ; may you do a favor and innovate another one for it
thanks man you are the best
April 12th, 2012 at 5:19 pm
Hey Gerglys,
I’m afraid I don’t use illustrator so I don’t know if it works.
Regards to running it within photoshop easier, you could try create an action and just do the instructions above and stop the action. Hopefully that will work for you.
Kyle
June 26th, 2012 at 8:36 am
It works but it needs about 10 minutes to count 490 layers in a 500MB psd with CS6.
June 26th, 2012 at 8:37 am
On a 2 year old Macbook Pro, that is
January 10th, 2013 at 10:27 am
Brilliant-Thankyou!
February 15th, 2013 at 4:41 am
Hey.
I just wanted to say thanks! It’s a pretty cool script.
February 22nd, 2013 at 5:28 pm
Thank you so much!!