JSFiddle - React, Tailwind, and code Playground

HTML

<body> <span>How many numbers <= 20 :</span>
 <span id='c'></span>

    <table id='a' border='2'>
        <tr>
            <td>225</td>
        </tr>
        <tr>
            <td>2</td>
        </tr>
        <tr>
            <td>17</td>
        </tr>
        <tr>
            <td>30</td>
        </tr>
        <tr>
            <td>31</td>
        </tr>
        <tr>
            <td>31</td>
        </tr>
    </table>
</body>

JavaScript

$(function () {
    var count = 0;
    $("#a td").each(function () {
        var b = $(this).text();
        if (parseInt(b) <= 20) {
            $(this).css("color", "red");
            count++;
        }
    });
    $("#c").text(count);
});