Can jquery count a certain value like total posts or topics?

Can jquery count a certain value like total posts or topics?

Say you got a forum that outputs per forum row the total posts and topics.

Can I run a little js script that counts the total posts or topics or both and if say

<= 150 posts = show a button called popular which means the forum in question is popular
<= 25 topics = show a button like above called popular but not show the button twice lol.

Just once so a function that counts both topics and replies that allows the button to show up if both conditions are met and if not be hidden.

Much like the idea behind this  http://jsfiddle.net/master412160/ax1ccchh/1/ that I managed to get thanks to Jake his help in the topic below this one.

  1. <dd class="topics">25 <dfn>Topics</dfn></dd>
  2. <dd class="posts">35 <dfn>Posts</dfn></dd>