How can I count the times a property is used?

How can I create a plugin to count how many times a color, font-size, font-weight etc is used?

You need to loop through the nodes and count what you need.

Hi, for line-height, sometimes it is set to auto which is not what I want. Is there a way to get the line height from the inspects tab where it shows the line-height in pixels?

In the Inspect panel, you could also see the comment: /* identical to box height */.
Therefore: TextNode.lineHeight = TextNode.height.

thnks. and what if the text is mixed? or what if it is not identical to the box height?

As an option, you can create a new text object for each segment to get its height/line height.