JSFiddle - React, Tailwind, and code Playground
HTML
<div title="a.b[c"></div>
<div id="result"></div>
<div id="expected">11</div>
JavaScript
$('#result')
.append($('div[title="a\\.b\\[c"]').length)
.append($('div[title="a\\.b\\[c"]:first').length);