I checkt the values in the layers and it shows the no. of tiles of all used chunks. Sure, that may differ from the actual map size, but it is quite good to get the number of chunks in x and y direction.
And this value is accurate for you? When I create e.g. a 30x20 infinite map and then paint way outside the 30x20 space, so my effective map size is more like 200x200, the map map and tile layer both still report the size as 30x20 - completely worthless for figuring out the chunks. Here, for example, is a large map with just four tiles placed in it at (-94, -78), (92, -76), (-92, 92), and (92,92):
<?xml version="1.0" encoding="UTF-8"?>
<map version="1.10" tiledversion="1.10.1" orientation="orthogonal" renderorder="right-down" width="30" height="20" tilewidth="16" tileheight="16" infinite="1" nextlayerid="2" nextobjectid="1">
<tileset firstgid="1" source=":/automap-tiles.tsx"/>
<layer id="1" name="Tile Layer 1" width="30" height="20">
<data encoding="base64" compression="zlib">
<chunk x="-96" y="-80" width="16" height="16">
eJxjYBgcgGWgHTAKRsEIBAAR4AAF
</chunk>
<chunk x="80" y="-80" width="16" height="16">
eJxjYBgFpACWgXbAKBgFVAQAD0AABQ==
</chunk>
<chunk x="-96" y="80" width="16" height="16">
eJxjYBgFo2AUwADLQDuAzgAAB8AABQ==
</chunk>
<chunk x="80" y="80" width="16" height="16">
eJxjYBgFo2AUEAtYBtoBVAYAB0AABQ==
</chunk>
</data>
</layer>
</map>
This map is effectively 187x171 in size (192 x 176 if we include the empty space in the chunks), but look at the size reported by both the map and layer: 30x20, the map's initial size. So, at least in Tiled 1.10.1, the map and layer size is not updated for infinite maps, it just keeps the value that the map was created with (edit: or the size it had when it was last finite, if it was ever finite).