# Aseprite Scripts Collection

**URL:** <https://community.aseprite.org/t/aseprite-scripts-collection/3599>\
**Category:** Scripts & Extensions\
**Created:** [July 24, 2019, 1:10am UTC](https://community.aseprite.org/t/aseprite-scripts-collection/3599 "2019-07-24T01:10:42Z")\
**Posts on this page:** 1\
**Showing post:** 45

<div class="post-metadata">

**Author:** ![Unknow0059](https://community.aseprite.org/user_avatar/community.aseprite.org/unknow0059/32/3785_2.png) [@Unknow0059](https://community.aseprite.org/u/Unknow0059)\
**Post date:** [January 17, 2021, 5:41am UTC](https://community.aseprite.org/t/aseprite-scripts-collection/3599/45 "2021-01-17T05:41:12Z")

</div>

Made a script to display the total number of non-empty cels from visible layers. Or, in naive terms, the total frame count.  
It’s ugly but it works.

```
-- Made 2021/01/17 00:32-02:14 by Unknow0059. For version of commit 9f88508 and higher.
tally = 0
for index, layer in ipairs(app.activeSprite.layers) do
    if layer.isVisible then
        for index, cel in ipairs(layer.cels) do
            if not cel.image:isEmpty() then
                tally = tally + 1
            end
        end
    end
end
app.alert(tostring(tally))
```

---

_[View the full topic](https://community.aseprite.org/t/aseprite-scripts-collection/3599)._
