8 7 5 bytes
Saved 2 bytes thanks to @Adnan
Try it online!
This is using the algorithm that was first found by @tsh. If you like this answer, make sure to upvote their answer as well!
Each time a skyscraper is lower than or as high as the previous one, it can be painted 'for free' by simply extending the brushstrokes.
For instance, painting skyscrapers \$B\$ and \$C\$ in the figure below costs nothing.
On the other hand, we need 2 new brushstrokes to paint skyscraper \$E\$, no matter if they're going to be reused after that or not.
For the first skyscraper, we always need as many brushstrokes as there are floors in it.
Turning this into maths:
If we prepend \$0\$ to the list, this can be simplified to:
0š¥þO # expects a list of non-negative integers e.g. [10, 9, 8, 9]
0š # prepend 0 to the list --> [0, 10, 9, 8, 9]
¥ # compute deltas --> [10, -1, -1, 1]
þ # keep only values made of decimal digits
# (i.e. without a minus sign) --> ["10", "1"]
O # sum --> 11