A handy way to know how many DOM Elements you have on your page is doing the following:
For example, if you do that in the console of my blog you will find an output something like
That is more than fair enough. Because is not the same loop through 144 or 2000 DOM elements on the page when you want to add something.
If that is your case, check if something can be improved.
That's all folks!