It seems the datasets count is also in a <noscript>
element:
<div class='centered' id='main' role='main'>
<div id='content'>
<noscript>
<table>
<tbody>
<tr>
<td>Database Name</td>
<td>Tokyo Stock Exchange</td>
</tr>
<tr>
<td></td>
<td></td>
</tr>
<tr>
<td>Datasets</td>
<td>3908</td>
</tr>
<tr>
<td>Downloads</td>
<td>4067259</td>
</tr>
<tr>
...
So you can grab that using something like this:
>>> import requests
>>> import lxml.html
>>> r = requests.get('https://www.quandl.com/data/TSE')
>>> h = lxml.html.fromstring(r.text)
>>> h
<Element html at 0x7ffb5f6ed0a8>
>>> h.xpath('//noscript')
[<Element noscript at 0x7ffb5c16ac58>, <Element noscript at 0x7ffb5c16ac00>]
>>> h.xpath('string(//noscript//tr[td[1]="Datasets"]/td[2])')
'3908'
>>> h.xpath('string(//div[@id="content"]//noscript//tr[td[1]="Datasets"]/td[2])')
'3908'
>>> h.xpath('number(//div[@id="content"]//noscript//tr[td[1]="Datasets"]/td[2])')
3908.0
Explanation on the XPath as requested by OP:
//div[@id="content"] <-- look for a <div> element with "id" attribute equal to "content"
//noscript <-- look for a <noscript> descendant
//tr[ <-- look for a <tr> descendant...
td[1]="Datasets" <-- ... which 1st <td> child string value is "Datasets"...
(this is true if the <td> contains only 1 text node "Datasets"
]
/td[2] <-- select the 2nd <td> of previous matching <tr> rows